Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
DCP asked whether an exclusive OR can be done in an Informix stored procedure, wanting to return 1 or 0 depending on how the XOR of a received value and a looked-up value compared with the first, and gave example pairs. Obnoxio The Clown questioned the logic, then pointed to the IDS 10 documentation notes. No solution was spelled out in the thread.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
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
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.