Here is the output trace of the clist I showed earlier...

>O>   "0"
      4 *-* say datatype(x)
        >V>   "0"
        >F>   "NUM"
 NUM
      5 *-* y = 00F0
        >L>   "00F0"
      6 *-* z = c2x(y)
        >V>   "00F0"
        >F>   "F0F0C6F0"
      7 *-* say z
        >V>   "F0F0C6F0"
 F0F0C6F0
      8 *-* say datatype(y)
        >V>   "00F0"
        >F>   "CHAR"
 CHAR
 ***

Regards,
Scott

I didn't think one could add two char strings together..maybe I am
wrong...been around rexx a long long time...



-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Scott Ford
Sent: Wednesday, March 12, 2008 8:39 PM
To: IBM-MAIN@bama.ua.edu
Subject: Re: Rexx bug?

This isn't a bug in rexx.....try this little clist....

/* rexx      */
X = 00E0 + 00E8
Say datatype(x)     < -- this returns NUM
Y = 00F0
say datatype(y)     <--- this returns CHAR


Can't add two character together...

Regards,
Scott



-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Kenneth E Tomiak
Sent: Wednesday, March 12, 2008 7:25 PM
To: IBM-MAIN@bama.ua.edu
Subject: Re: Rexx bug?

Reminds me of a problem I thought I had once, how about EXPONENTIAL form 
affecting e0 versus e8?


On Tue, 11 Mar 2008 22:43:18 +0200, Binyamin Dissen 
<[EMAIL PROTECTED]> wrote:

>On Tue, 11 Mar 2008 15:29:16 -0500 "Patrick O'Keefe" 
<[EMAIL PROTECTED]>
>wrote:
>
>:>On Tue, 11 Mar 2008 15:09:45 +0100, Thomas Berg
>:><[EMAIL PROTECTED]> wrote:
>
>:>>...
>:>>> ... REXX sees 2 equal numbers in the first case and 2 different
>:>>> strings in the second case.
>
>:>>No.  REXX sees 1 string in each case ("00E0 00E8" and "00F0 00F8").
>:>>Try  x = 00E0 + 00E8  and  y = 00F0 + 00F8
>:>>You will get an error in the latter case.
>:>>...
>
>:>Ok.  I worded that very poorly.  Assuming that the exec is going to
>:>parse its parm string into hex arguments, it had better take care to
>:>handle those args as strings wherever they might be misconstrued
>:>as numbers.
>
>If you want them to be treated as hex arguments, use C2X. Otherwise
>
>        000E0 == 00E0
>
>will return not equal.
>
>--
>Binyamin Dissen <[EMAIL PROTECTED]>
>http://www.dissensoftware.com
>
>Director, Dissen Software, Bar & Grill - Israel
>
>
>Should you use the mailblocks package and expect a response from me,
>you should preauthorize the dissensoftware.com domain.
>
>I very rarely bother responding to challenge/response systems,
>especially those from irresponsible companies.
>
>----------------------------------------------------------------------
>For IBM-MAIN subscribe / signoff / archive access instructions,
>send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
>Search the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to