Why no logical XOR operator
Cameron Simpson,Uhmmm..???? Who knows
cameron at usage.csd.oz
Sun Sep 16 14:42:31 AEST 1990
>From article <1990Sep14.185916.2247 at basho.uucp>, by john at basho.uucp (John Lacey):
|cameron at usage.csd.oz (Cameron Simpson,Uhmmm..???? Who knows) writes:
|> - What's wrong with saying:
|> !!x ^ !!y
|> which accomplishes exactly what you want.
|
| What? If x = y = 1, then !!x = !!y = 1, and 1 ^ 1 = 1, but x ^^ y = 0.
Run that by me again? `1 ^ 1 = 1' ? You sure learnt logic in a different
school from me. Of course, one can be even terser and say
!x ^ !y
instead of
!!x ^ !!y
but the effect is the same.
- Cameron Simpson
cameron at spectrum.cs.unsw.oz.au
More information about the Comp.std.c
mailing list