The following table lists the precedence and associativity of ET operators.
Operators are listed top to bottom, in descending precedence.
Precedence | Operator | Description | Associativity |
---|---|---|---|
1 | ++ – () [] |
Suffix/Postfix increment Suffix/Postfix decrement Function call Array subscripting |
Left-to-right |
2 | + - ! ~ & |
Unary plus Unary minus Logical NOT Bitwise NOT Address-of |
Right-to-left |
3 | ** | Pow | Left-to-right |
4 | * / % |
Multiplication Division Remainder |
Left-to-right |
5 | + - |
Addition Subtraction |
Left-to-right |
6 | << >> |
Bitwise left shift Bitwise right shift |
Left-to-right |
7 | < <= > >= |
For relational operators < respectively For relational operators ≤ respectively For relational operators > respectively For relational operators ≥ respectively |
Left-to-right |
8 | == != |
For relational = For relational ≠ |
Left-to-right |
9 | && | Logical AND | Left-to-right |
10 | || | Logical OR | Left-to-right |
11 | ^ |