WARN58-Mixed operator precedence levels
|Top Previous Next|
Mixed operator precedence levels (WARN58)
This section lists locations in your code where operators of different levels are mixed. Operators are in Object Pascal evaluated from left to right, unless parentheses are used. Operators of level 1 are evaluated before operators of level 2 etc.
Level 1: @, not
Level 2: *, /, div, mod, and, shl, shr, as
Level 3: +, -, or, xor
Level 4: =, <>, <, >, <=, >=, in, is
Mixing operators is perfectly valid but you will find that your code is clearer and easier to understand if you insert parentheses. Then you do not have to think about operator precedence.