> offset1 = "0000E0" ; > offset2 = "0000E8" ; > if (offset1 = offset2) then say "MATCH!" ; > else say "NO MATCH!"
John, I'm a little confused now ... Todd said that his comparison returned 'match'. If REXX executed a comparison of two equal-length character strings, then a 'match' - result would be incorrect. Only if REXX interpreted the two character strings as numerical values in exponent notation (0**0 and 0**8) and performed a numerical comparison, would a 'match' - result be expected. But why? That's not logical. Todd coded two quoted character strings, didn't he? Could someone please run a TRACE and post the results? I can't at the moment. This really puzzles me. Regards, Ulrich Krueger -----Original Message----- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of John P. Baker Sent: Monday, March 10, 2008 10:29 To: [email protected] Subject: Re: Rexx bug? Ulrich, As long as his intent is a simple equality/inequality test, "=="/"<>" will work fine, in so far as the offsets are both presented with the same length and in the same case. A requirement for x2d(...) will only arise if the offsets are presented with the possibility of differing lengths, differing cases, or if a comparative magnitude test is required (<, <=, >=, or >). John P. Baker -----Original Message----- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Ulrich Krueger Sent: 03/10/2008 1:00 PM To: [email protected] Subject: Re: Rexx bug? Todd, What is your intent with this comparison? Do you want to compare two quoted character strings or do you want to compare the numeric (hexadecimal) values? If the latter, shouldn't you have coded either offset1 = "0000E0"X; offset2 = "0000E8"X; Or offset1 = x2d("0000E0"); offset2 = x2d("0000E8"); instead? Regards, Ulrich Krueger ---------------------------------------------------------------------- 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

