On Fri, 14 Apr 2006 13:07:26 GMT, in comp.lang.rexx (Message-ID:<[EMAIL PROTECTED]>) [EMAIL PROTECTED] (Neal Eckhardt) wrote:

I am probably missing something very obvious. I want to input a hex value and do an exclusive OR on the entered value. The example in the REXX manual shows rhe BITXOR function with two values represented as hex strings ( ie '12fe'x) Since I am using an inputted value, the value is a character string and not a numeric representation. The BITXOR is not interpreting the data correctly. A trace is provided below. How do I get the inputed value to a form that will work with
the BITXOR function.

Thanks,
Neal

    6 *-* bdate=d2x(ans,7),
      >V>   "2004305",
      >L>   "7",
      >F>   "01E9551",
    7 *-* cdate="'" || bdate || "'x",
      >L>   "'",
      >V>   "01E9551",
      >O>   "'01E9551",
      >L>   "'x",
      >O>   "'01E9551'x",
    8 *-* say cdate,
      >V>   "'01E9551'x",
'01E9551'x,
    9 *-* date1=bitxor(bdate,'1234'x)
      >V>   "01E9551",
      >L>   "??",
      >F>   "SEE9551",

try:

bdate=d2c(ans,4)
/* note1: d2c *not* d2x */
/* note2: decide whether length should be 3 or 4 */
date1=bitxor(bdate,'1234'x)
----------------------------------------------------------------------
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