Precedence Madness
Why does == have a higher precedence than &?
It took me forever to figure out why:if (value1 == value2 & mask)
wasn't producing the expected result. On a whim I forced the order of operations to:if (value1 == (value2 & mask))
and that's when I realized my error. Comparisons should follow operators and precede the "logics".