op precedence in C - (nf)
utzoo!decvax!cca!hplabs!hao!menlo70!sytek!zehntel!teklabs!ucbcad!moore at sri-unix
utzoo!decvax!cca!hplabs!hao!menlo70!sytek!zehntel!teklabs!ucbcad!moore at sri-unix
Sat Oct 23 20:44:19 AEST 1982
#R:linus:-18200:ucbcad:25100001:000:537
ucbcad!moore Oct 23 20:43:00 1982
The problem is that you are using & instead of &&. Using logical
instead of bitwise AND in if() statements is something which must
be bred out of C programmmers.
Excuse me? Only if you want an incompetent new breed of C programmers. Very
typical in C is to use '&' and masks to extract fields, i.e. :
if ( (stat&UPPER_BYTE_MASK) == ERROR_VALUE ) {
/* blah */
}
Are you implying that this can or should be done with && ?
Peter Moore
...!ucbvax!ucbcad!moore (USENET)
ucbcad.moore at berkeley (ARPANET)
More information about the Comp.lang.c
mailing list