Another common trap is the precedence between == and & | ^
The expression a & b == 0 is interpreted as a & (b==0) instead of (a & b) == 0, quite different from a + b == 0.
Conclusion: always add brackets when evaluating the bitwise operators & | ^
Monday, October 29, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment