on logical and

utzoo!watmath!rtris utzoo!watmath!rtris
Sat Oct 23 14:37:10 AEST 1982


Someone suggested that someone else was using "if(x & a == b)" the &
instead of &&.
Entirely possible of course, but the idea never occurred to me. In fact the
article saved chasing a bug because I had if clauses of that form in a new
program, and "x & a" is a variable being masked! I.e. && would hardly do what
I wanted!
In other words I just want to state that this is a perfectly valid kind of
thing to do, and thus the problem is real.

						Ralph.



More information about the Comp.lang.c mailing list