Article View: comp.std.c
Article #1680Why no logical XOR operator
From: D'Arcy J.M. Cain
Date: Wed, 12 Sep 1990 15:45
Date: Wed, 12 Sep 1990 15:45
18 lines
851 bytes
851 bytes
Recently I had occasion to write something like the following code: if ((!x && (y & z)) || (x && !(y & z)) something(); Which would have been simpler as: if (x ^^ (y & z)) something(); If there was such a thing as a '^^' operator. Does anyone know why C left out the logical XOR operator? -- D'Arcy J.M. Cain (darcy@druid) | D'Arcy Cain Consulting | MS-DOS: The Andrew Dice Clay West Hill, Ontario, Canada | of operating systems. + 416 281 6094 |
Technical Details
Message-ID:
<1990Sep12.154515.18460@druid.uucp>Path:
arc1-ca.pugleaf.net!utzoo!telly!druid!darcyShow Full Headers
Complete Article Headers
Newsgroups: comp.std.c Path: arc1-ca.pugleaf.net!utzoo!telly!druid!darcy From: darcy@druid.uucp (D'Arcy J.M. Cain) Subject: Why no logical XOR operator Organization: D'Arcy Cain Consulting, West Hill, Ontario Date: Wed, 12 Sep 90 15:45:15 GMT Message-ID: <1990Sep12.154515.18460@druid.uucp> >from: darcy@druid.uucp (D'Arcy J.M. Cain)