Newsgroups: comp.std.c Path: 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) 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 |