Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!munnari.oz.au!cs.mu.oz.au!ok From: ok@cs.mu.oz.au (Richard O'Keefe) Newsgroups: comp.lang.c Subject: Re: ambiguous ? Message-ID: <2521@munnari.oz.au> Date: 25 Oct 89 05:25:09 GMT References: <1989Oct21.071319.8839@utzoo.uucp> <14106@lanl.gov> <11401@smoke.BRL.MIL> Sender: news@cs.mu.oz.au Lines: 14 In article <11401@smoke.BRL.MIL>, gwyn@smoke.BRL.MIL (Doug Gwyn) writes: > In article <2493@munnari.oz.au> ok@cs.mu.oz.au (Richard O'Keefe) writes: > >you can use & and |. > & and | aren't really Boolean operators in the normal use of the term > in the context in which this arose; they're bitwise integer operators. I know perfectly well what & and | are, but if you build up expressions out of comparisons (E1 E2), negations (using ! rather than ~), and & and |, you can't tell the difference. The difference only shows up when some of the leaves have values other than 0 or 1, and with C's comparison operators that can't happen. It remains true that you can *USE* & and | as versions of "and" and "or" that are commutative, associative, &c.