For Programmers: Free Programming Magazines  


Home > Archive > Fortran > September 2005 > Re: PL/I Can create an Upper case function and Anything Else









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: PL/I Can create an Upper case function and Anything Else
robin

2005-09-12, 6:58 pm

David Frank wrote in message ...
|
|"James J. Weinkam" <jjw@cs.sfu.ca> wrote in message
|news:W%0Ve.269044$on1.102625@clgrps13...
|>
|> As Robin has said, recent versions of PL/I have UPPERCASE and LOWERCASE
|> built in functions which work correctly irrespective of the character code
|> in use. Your code will fail in EBCDIC. All version of PL/I have the
|> TRANSLATE built in function. UPPERCASE and LOWERCASE are just special
|> cases of TRANSLATE which is also independent of character code.
|>
|> Although it would be foolish to do so, it would be easy to write code
|> equivalent to yours using RANK and BYTE. Only a masochist would do so,
|> since the result would be slower and non portable.
|
|As a IBM rep has said, ALL their current compilers support ONLY ASCII as the
|native text,
|which is what Fortran supports.
|Furthermore, like always my challenge only addresses Windows PL/I
|capabilities.

Windows PL/I supports EBCDIC as well as ASCII,
and 16-bit characters and GRAPHIC.
So does Enterprise PL/I (z/OS).
Why don't you read the manual?

|I believe you got involved when a similar challenge was for a PL/I TRIM
|function to be written, yes/no?
|(only Windows PL/I has such a function?)..

TRIM is available at least in Enterprise PL/I, Windows VA PL/I, and PL/I for OS/2.

|A PL/I function declaration cant declare a string output length determined
|dynamically by input string length,
|in fact mainframe PL/I hardly supports at all, isnt that true?

Why don't you read the manual?
A PL/I function can return a character string whose
current length depends on an input string length or
anything else.

|function User_String_Function(s1) result (s2)
|character(*) :: s1
|character(len(s1)) :: s2 ! <- cant do this even in Windows PL/I

Can so -
declare s2 char (length(s1));
in all versions of PL/I.
You really need to read the manual.

|note: it was Robin Vowels who again cross-posted a PL/I topic to
|comp.lang.fortran

It was a Fortran topic.






Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com