ambiguous ?

Richard O'Keefe ok at cs.mu.oz.au
Wed Oct 25 15:25:09 AEST 1989


In article <11401 at smoke.BRL.MIL>, gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
> In article <2493 at munnari.oz.au> ok at 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 <relop> 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.



More information about the Comp.lang.c mailing list