C history question
Doug Gwyn
gwyn at smoke.BRL.MIL
Wed Sep 13 18:03:59 AEST 1989
In article <1687 at sunset.MATH.UCLA.EDU> pmontgom at math.ucla.edu (Peter Montgomery) writes:
>shouldn't we be allowed to abbreviate this to
> allok &&= a[i] > b[i];
If allok is being used as a Boolean, as it should be in such a context,
you can use &= instead. One less character to type, too.
Now I suppose someone will point out that == does the wrong thing for
the high-order 0 bits in a C pseudo-Boolean (represented as int 0 or 1),
so they "need" an === assignment-operator. This can clearly quickly get
out of hand. Suffice it to say that the lack of the full set of 10
non-trivial binary Boolean operators and their corresponding assignment
versions hasn't seemed to be a significant practical problem to me, and
I'm more "Boolean aware" than most..
More information about the Comp.lang.c
mailing list