|
void Test (char Value) {
if (Value & 0x07 == 0) {
Value = 1;
}
транслируется как:
if (Value & (0x07 == 0)) { Always false
Value = 1;
}
Precedence and Associativity of C Operators
[ ] ( ) . –> postfix ++ and postfix –– Expression Left to right
prefix ++ and prefix ––
sizeof & * + – ~ ! Unary Right to left
typecasts Unary Right to left
* / % Multiplicative Left to right
+ – Additive Left to right
<< >> Bitwise shift Left to right
< > <= >= Relational Left to right
== != Equality Left to right
& Bitwise-AND Left to right
^ Bitwise-exclusive-OR Left to right
| Bitwise-inclusive-OR Left to right
&& Logical-AND Left to right
|| Logical-OR Left to right
? : Conditional-expression Right to left
= *= /= %=
+= –= <<= >>=
&= ^= |= Simple and compound assignment2 Right to left
, Sequential evaluation Left to right
E-mail: info@telesys.ru