Order of evaluation
- When arithmetic operators and functions are used in a logical expression, the order of operations is functions and arithmetic operations first, then relational operators, and then logical operators.
- When more than one logical operator is used,
NOT
is evaluated first, thenAND
, and thenOR
. - To change the order of evaluation, use parentheses.