PL/I

PL/I

PL/I

 View Only
Expand all | Collapse all

"expression" type in UPPERCASE/LOWERCASE builtins

  • 1.  "expression" type in UPPERCASE/LOWERCASE builtins

    Posted Thu August 09, 2018 08:07 AM

    The new UPPERCASE builtin is described as optionally accepting a expression

    that specifies the code page to use for the translation.    However, it neglects to

    indicate the type of that expression... presumably it's FIXED BIN(31,0) (or converted

    to such?) based on the example given there.   But, if the type of the 'c' expression

    were, for example CHAR - then the value in the example would be converted to CHAR?

     

    The LOWERCASE builtin's documentation suffered the same.

     

    Is the type of 'c'  for LOWERCASE/UPPERCASE FIXED BIN(31,0) (and converted to such if not?)  Or,

    is it something else?

     

       - Thanks -

       - Dave Rivers -

     

    tdr


  • 2.  Re: "expression" type in UPPERCASE/LOWERCASE builtins

    Posted Fri August 10, 2018 09:41 AM

    Hi Dave,

    At present, c needs to be a restricted expression, ie. one that the compiler can evaluate at compile time to produce a possibly signed number. The compiler limits appendix lists the supported codepages. 

    I've sent a few comments regarding this to the documentation people.

    Bernie

    brataj