Operator precedence

The precedence of operators in expressions is as follows. Expressions in parentheses are evaluated first, then multiplication and division before addition and subtraction. String concatenation happens after addition and subtraction. The operators at the top of the list are evaluated before those at the bottom of the list.

Tip

Make the order of operation explicit in UltraLite, rather than relying on an operator precedence. That means, when you use more than one operator in an expression you should order operations clearly with parentheses.

  1. names, functions, constants, IF expressions, CASE expressions

  2. ()

  3. unary operators (operators that require a single operand): +, -

  4. ~

  5. &, | , ^

  6. *, /, %

  7. +, -

  8. ||

  9. comparisons: >, <, <>, !=, <=, >=, [ NOT ] BETWEEN, [ NOT ] IN, [ NOT ] LIKE

  10. comparisons: IS [NOT] TRUE, FALSE, UNKNOWN

  11. NOT

  12. AND

  13. OR