Article View: comp.std.c
Article #5137Re: the logical xor operator!
From: Karl Heuer
Date: Fri, 24 Jun 1988 23:29
Date: Fri, 24 Jun 1988 23:29
17 lines
1243 bytes
1243 bytes
In article <1310@ark.cs.vu.nl> maart@cs.vu.nl (Maarten Litmaath) writes: >This time the question is: why hasn't C got a logical xor operator? Since you posted the question to comp.std.c, I'll interpret the question as "Why wasn't logical xor added to ANSI C?". The answer is that it isn't useful enough to be worth the change to the language. >Of course the way to come around the deficiency is: [ !x != !y ] >but this only works if !0 always evaluates to the same value (viz. 1), Which it is and always has been. Of course, if you're dealing with true boolean expressions (and I hold the opinion that nothing else should be handed to a logical operator), then either "x != y" or "x ^ y" will do. Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint
Technical Details
Message-ID:
<4752@haddock.ISC.COM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!ames!husc6!spdcc!ima!haddock!karlReferences:
<haddock.4604> <1719@ogcvax.ogc.edu> <1309@ark.cs.vu.nl> <1310@ark.cs.vu.nl>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!ames!husc6!spdcc!ima!haddock!karl From: karl@haddock.ISC.COM (Karl Heuer) Newsgroups: comp.std.c Subject: Re: the logical xor operator! Message-ID: <4752@haddock.ISC.COM> Date: 24 Jun 88 23:29:00 GMT References: <haddock.4604> <1719@ogcvax.ogc.edu> <1309@ark.cs.vu.nl> <1310@ark.cs.vu.nl> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 16