Path: utzoo!mnetor!uunet!husc6!ukma!ufcsv!codas!mtune!whuts!homxb!hropus!ki4pv!tanner From: tanner@ki4pv.uucp (Dr. T. Andrews) Newsgroups: comp.lang.c Subject: Re: Power operator? Message-ID: <7227@ki4pv.uucp> Date: 13 Jan 88 17:18:59 GMT References: <11169@brl-adm.ARPA> <10026@ut-sally.UUCP> <7007@brl-smoke.ARPA> Organization: CompuData, DeLand Lines: 26 Summary: this is going to be somewhat confusing In article <7007@brl-smoke.ARPA>, gwyn@brl-smoke.UUCP writes: ) In article <10026@ut-sally.UUCP> nather@ut-sally.UUCP (Ed Nather) writes: ) > a ^^ b ) I think this is about as good a notation as we can get that is ) compatible with existing code. I fear that this would cause some confusion. While there is not CURRENTLY a "logical" xor operator, consider the following table: symbol op symbol op & b-and && l-and | b-or || l-or ^ b-xor ^^ power = cause equality == test equality (b-operation=bitwise; l-operation=logical) I don't know why there is no "logical" xor operation (same effect as ((op1 != 0)^(op2 != 0)) construction), but if one were to use the "^^" symbol, it would seem reasonable to expect it to yield a logical xor. Also, is that a kitchen sink I see hidden away under the rationale? Back behind that old stack of "codifying existing practice" bumper stickers? -- {allegra clyde!codas decvax!ucf-cs ihnp4!codas killer}!ki4pv!tanner