TRUE and FALSE
Richard A. O'Keefe
ok at goanna.cs.rmit.oz.au
Sun Sep 9 22:34:32 AEST 1990
>In article <F4u9._?1 at cs.psu.edu>, flee at guardian.cs.psu.edu (Felix Lee) writes:
> Personally, I use this set of macros:
> #define CNAND(a,b) (!((a)&&(b)))
Surely this was a joke?
In article <728 at tetrauk.UUCP>, simons at tetrauk.UUCP (Simon Shaw) writes:
> IMHO, the compounds NOR and NAND, while much more useful if constructing
> electronic circuitry, are considerably less clear in code (Not to mention
> XNOR, which even now takes me a few seconds to work out).
What's in a name? XNOR(a,b) is just !!(a) == !!(b), true when a and b
have the same "truth value", false when they differ. It's available in
Fortran under the name .EQV., in Algol 60 under the name %equiv, and in
Pascal and Ada under the name '='. Rename XNOR() to BoolEqual() and it
is pretty easy to figure out.
--
Psychiatry is not about cure. Psychiatry is about power.
More information about the Comp.lang.c
mailing list