SCOUG-Programming Mailing List Archives
Return to [ 31 |
August |
2003 ]
<< Previous Message <<
>> Next Message >>
Content Type: text/plain
Peter:
Here are the results:
[C:\]rexxtry say '0123456789ABCDEFGH'
0123456789ABCDEFGH
................................................ REXXTRY.CMD on OS/2
[C:\]rexxtry say XRANGE('30'x,'39'x)XRANGE('41'x,'48'x)
0123456789ABCDEFGH
................................................ REXXTRY.CMD on OS/2
[C:\]rexxtry say X2C('303132333435363738394142434445464748')
0123456789ABCDEFGH
................................................ REXXTRY.CMD on OS/2
HCM
On Sun, 31 Aug 2003 04:24:49 PDT7, Peter Skye wrote:
>Harry Motin wrote:
>>
>> >> I can't remember the Rexx function
>> >> that expands f('00'h..'11'h) to the
>> >> '0123456789ABCDEFGH' character string.
>>
>> How 'about the REXX function "X2C()"? Please see below:
>>
>> Here are some examples:
>> X2C('4865 6c6c 6f') -> 'Hello' /* ASCII */
>> X2C('3732 73') -> '72s' /* ASCII */
>
>Hi Harry,
>
>That works too.
>
>I was looking for a "shorthand" method to obtain '0123456789ABCDEFGH'
>and was trying to remember XRANGE. Unfortunately XRANGE doesn't work
>too well because the hex values for 0..9 and A..H aren't contiguous ('9'
>is 39h while 'A' is 41h).
>
>The shortest way to write the string is to just write it. :)
>
> '0123456789ABCDEFGH'
> XRANGE('30'x,'39'x)XRANGE('41'x,'48'x)
> X2C('303132333435363738394142434445464748')
>
>and if anybody wants to check just cut & paste the following to a
>command line (you can do all three lines at once):
>
> rexxtry say '0123456789ABCDEFGH'
> rexxtry say XRANGE('30'x,'39'x)XRANGE('41'x,'48'x)
> rexxtry say X2C('303132333435363738394142434445464748')
>
>- Peter
>
>
>=====================================================
>
>To unsubscribe from this list, send an email message
>to "steward@scoug.com". In the body of the message,
>put the command "unsubscribe scoug-programming".
>
>For problems, contact the list owner at
>"rollin@scoug.com".
>
>=====================================================
>
>
=====================================================
To unsubscribe from this list, send an email message
to "steward@scoug.com". In the body of the message,
put the command "unsubscribe scoug-programming".
For problems, contact the list owner at
"rollin@scoug.com".
=====================================================
<< Previous Message <<
>> Next Message >>
Return to [ 31 |
August |
2003 ]
The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS
RESERVED.
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International
Business Machines Corporation.
All other trademarks remain the property of their respective owners.
|