Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ihlpg!tainter From: tainter@ihlpg.ATT.COM (Tainter) Newsgroups: comp.lang.c Subject: Re: "logical" xor Message-ID: <4612@ihlpg.ATT.COM> Date: 12 Jan 88 23:32:52 GMT References: <11207@brl-adm.ARPA> <20153@teknowledge-vaxc.ARPA> Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 9 In article <20153@teknowledge-vaxc.ARPA>, mkhaw@teknowledge-vaxc.ARPA (Mike Khaw) writes: > 1^0 = 1; 0^0 = 0; 1^1 = 0 => logical xor should mean "does not equal", > for which C has a perfectly good symbol, "!=" > Mike Khaw No. Logical xor should mean "not logically equal" for which != does not work. You would still need to do an equivalent of ((A!=0) != (B!=0)). Note: (!A ^ !B) and (!A != !B) work fine. --j.a.tainter