At first glance the two hex. strings appear to be unequal and normally one would expect "false". However, when the '=' operator is used for comparison, REXX first checks if both operands are numeric. '0000' is obviously numeric (zero) and '00e0' is, according to the REXX rules, also numeric and zero, it corresponds to the exponential method (mantissa.Eexponent) of writing a zero. Consequently the above comparison returns 'equal'.
If you really want to compare strings on a character-to-character basis, which is the case in this hex. comparison, use the '==' (exactly equal) operator.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.