Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: "logical" xor Message-ID: <7080@brl-smoke.ARPA> Date: 14 Jan 88 10:07:31 GMT References: <2946@zeus.TEK.COM> <170@illusion.UUCP> <39a83409.ae48@apollo.uucp> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 7 In article <39a83409.ae48@apollo.uucp> arnold@apollo.UUCP (Ken Arnold) writes: >All (a != 0) is guaranteed to generate (if a is not 0) is a non-zero value, >*any* non-zero value, which just *usually* is 1. It could be 7. I don't know why Ken says this. In fact the value of a relational or (in)equality expression is 1 if the condition is true and 0 if the condition is false. That's why my example ((x != 0) ^ (y != 0)) works.