The nonexistent operator (along = v. == lines)
Dave Eisen
dkeisen at Gang-of-Four.Stanford.EDU
Thu Apr 4 06:37:48 AEST 1991
In article <157 at revcan.UUCP> darren at revcan.UUCP (Darren Morbey) writes:
>What I did require was an operator, macro, or function that treated
>its operands as "zero" or "non-zero" as && and || do rather than
>the bitwise & | ^. I also would like some guarantee that both
>operands were evaluated *once* *and* *only* *once* (O&OO). Based
>on that, I do recognize that in
#define XOR(a,b) (!!(a) ^ !!(b))
does what you want.
--
Dave Eisen
1101 San Antonio Rd. Suite 102
Mountain View, CA 94043
(415) 967-5644 dkeisen at Gang-of-Four.Stanford.EDU (for now)
More information about the Comp.lang.c
mailing list