Article View: comp.std.c++
Article #1809Re: Why no logical XOR operator?
From: Robert Newshutz
Date: Tue, 22 Aug 1995 14:54
Date: Tue, 22 Aug 1995 14:54
28 lines
1877 bytes
1877 bytes
In article <40sp1t$lbc@cd4680fs.rrze.uni-erlangen.de>, rtrisack@faui01.informatik.uni-erlangen.de (Robert Risack) writes: |> Hello. |> |> I'm wondering why there isn't a logical XOR operator (eg. ^^) |> though there is a bitwise one (ie. ^). |> |> The other bitwise operators ( & | and ~ ) have their logical |> aquivalent ( && || and ! ). And the XOR is IMHO not that uncommon. |> |> Bye... |> --- |> | '. .. | Robert Risack | Jeder ist Auslaender - fast |> , s| __/ . <___> __/ o . | _ | ueberall. Everybody is a |> `--' /.. / / . / / | PObEPT P|/|3AK | foreigner - almost everywhere. |> Robert Risack - Gebbertstr. 12 - 91054 Erlangen - FR Germany |> --- |> [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu. |> Contact address: std-c++-request@ncar.ucar.edu. The moderation policy |> is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ] Use != to get a logical xor function. As long as you are working with true boolean (0 and 1) this works. Rob Newshutz (newshutz@vnet.ibm.com) [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu. Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<41cq2r$18lt@locutus.rchland.ibm.com>Path:
arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamageReferences:
<40sp1t$lbc@cd4680fs.rrze.uni-erlangen.de>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamage From: newshutz@rchland.ibm.com (Robert Newshutz) Newsgroups: comp.std.c++ Subject: Re: Why no logical XOR operator? Date: 22 Aug 1995 14:54:41 GMT Organization: IBM Rochester MN Approved: clamage@eng.sun.com (comp.std.c++) Distribution: world Message-ID: <41cq2r$18lt@locutus.rchland.ibm.com> References: <40sp1t$lbc@cd4680fs.rrze.uni-erlangen.de> NNTP-Posting-Host: taumet.eng.sun.com Content-Type: text X-Nntp-Posting-Host: charlie.rchland.ibm.com Content-Length: 1074 Originator: clamage@taumet