For Programmers: Free Programming Magazines  


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









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
robin

2005-09-13, 7:57 am

Tom Linden wrote in message ...

>Normally don't comment on threads initiated by the OP, but you can
>
> uc_table = translate( collate(),
> 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
> 'abcdefghijklmnopqrstuvwxyz');
> key_name = translate(key_name,uc_table, collate());
>This will oviously only work if the compiler supports the COLLATE bif.
>If not, declare a STATIC array of 256 chars and use in place of the bif.


better is:
key_name=translate(key_name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz');
because
(a) the table can be set up at compile time.
(b) only one TRANSLATE is required.





Sponsored Links







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

Copyright 2009 codecomments.com