The nonexistent operator (along = v. == lines)

Josef Wolf Sepp at ppcger.ppc.sub.org
Sat Apr 6 10:19:02 AEST 1991


darren at revcan.UUCP (Darren Morbey) writes:

] 1.    #define XOR(a,b) ( ( !(a) && (b) ) || ( (a) && !(b) ) )
] 2.    #define XOR(a,b) ( !(a) != !(b) )
] 3.    #define XOR(a,b) ( (a) ? !(b) : (b) )  /* my favourite. */

Waht about #define XOR(a,b) (a) != (b) /* just a suggestion */

Greets
    Sepp

| Josef Wolf, Germersheim, Germany | +49 7274 8047  -24 Hours- (call me :-)
| ...!ira.uka.de!smurf!ppcger!sepp | +49 7274 8048  -24 Hours-
|     sepp at ppcger.ppc.sub.org      | +49 7274 8967  18:00-8:00, Sa + Su 24h
|  "is there anybody out there?"   | all lines 300/1200/2400 bps 8n1



More information about the Comp.lang.c mailing list