Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!julius.cs.uiuc.edu!rpi!batcomputer!munnari.oz.au!metro!usage.csd.unsw.oz.au!spectrum!cameron From: cameron@usage.csd.oz (Cameron Simpson,Uhmmm..???? Who knows) Newsgroups: comp.std.c Subject: Re: Why no logical XOR operator Message-ID: <852@usage.csd.unsw.oz.au> Date: 16 Sep 90 04:42:31 GMT References: <1990Sep14.185916.2247@basho.uucp> Sender: news@usage.csd.unsw.oz.au Reply-To: cameron@spectrum.cs.unsw.oz.au (Cameron Simpson) Organization: none Lines: 16 From article <1990Sep14.185916.2247@basho.uucp>, by john@basho.uucp (John Lacey): |cameron@usage.csd.oz (Cameron Simpson,Uhmmm..???? Who knows) writes: |> - What's wrong with saying: |> !!x ^ !!y |> which accomplishes exactly what you want. | | What? If x = y = 1, then !!x = !!y = 1, and 1 ^ 1 = 1, but x ^^ y = 0. Run that by me again? `1 ^ 1 = 1' ? You sure learnt logic in a different school from me. Of course, one can be even terser and say !x ^ !y instead of !!x ^ !!y but the effect is the same. - Cameron Simpson cameron@spectrum.cs.unsw.oz.au