Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!munnari.oz.au!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: TRUE and FALSE Message-ID: <3712@goanna.cs.rmit.oz.au> Date: 9 Sep 90 12:34:32 GMT References: <11215@alice.UUCP> <514@demott.COM> <2316@cirrusl.UUCP> <728@tetrauk.UUCP> Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 18 >In article , flee@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@tetrauk.UUCP>, simons@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.