Standard extensions (logical exclusive or)

Fred Yankowski fcy at iham1.UUCP
Fri Nov 9 05:37:37 AEST 1984


Although "A != B" does not work as a C implementation of logical-
exclusive-or, "!A != !B" (or "!!A == !B") does, since the '!'
operator has the effect of converting an integer into a "canonical"
boolean value:  zero or one (and negating the logical sense, of
course).  Logical equivalence for arbitrary integers can be
similarly defined by "!A == !B".


    Fred Yankowski ::: AT&T Bell Laboratories ::: ihnp4!iham1!fcy



More information about the Comp.lang.c mailing list