exclusive OR in stored procedures
Posted in 2007
Topics: Stored Procedures & SPL
Is it possible to perform an exclusive OR operation in a stored procedure? I need to be able to receive a value ($a) and do a lookup ($b), returning 1 if (($a XOR $b) < $a) or ($b>$a)) -- otherwise returning 0. -- DCP
DCP said: > > Is it possible to perform an exclusive OR operation in a stored procedure? > I > need to be able to receive a value ($a) and do a lookup ($b), returning 1 > if > (($a XOR $b) < $a) or ($b>$a)) -- otherwise returning 0. How can $a < $a? -- Bye now, Obnoxio "I'm astonished anyone pays real money for this crap." -- Cosmo -- This message has been scanned for viruses and dangerous content by OpenProtect(http://www.openprotect.com), and is believed to be clean.
"Obnoxio The Clown" <obnoxio@serendipita.com> wrote in message news:mailman.326.1173201777.10648.informix-list@iiug.org... > >> Is it possible to perform an exclusive OR operation in a stored >> procedure? I >> need to be able to receive a value ($a) and do a lookup ($b), returning 1 >> if >> (($a XOR $b) < $a) or ($b>$a)) -- otherwise returning 0. > > How can $a < $a? It cannot be... (when $a XOR $b = $a, the both $a and $b are 0.. and it should return 0). Some examples might help.. 65 xor 4 = 69 (return 0) 65 xor 64 = 1 (return 1) 65 xor 1 = 64 (return 1) 65 xor 16 = 81 (return 0) 65 xor 65 = 0 (return 0) 132 xor 4 = 128 (return 1) 132 xor 16 = 148 (return 0) -- DCP
http://publib.boulder.ibm.com/infocenter/idshelp/v10/topic/com.ibm.docnotes.doc/uc6/ids_bidbm_docnotes_10.0.html#wq14 -- Bye now, Obnoxio "I'm astonished anyone pays real money for this crap." -- Cosmo -- This message has been scanned for viruses and dangerous content by OpenProtect(http://www.openprotect.com), and is believed to be clean.