Operator Precedence

When many operations occur in an expression, the compiler examines each part in a pre-specified sequence known as operator precedence.

Precedence

Primary
(…)
Unary
+, -, Not
Bit Shift
SHL, SHR
Arithmetic (binary)
^
*, /, Mod, Rem
+, -
String Concatenation
&
Data type
As, In, Is
Null coalescing
|?
Comparison
<, <=, >, >=, =, <>
Logical/Bitwise
And, And Then, Or, Or Else, Xor
Conditional
If…Then…Else

Associativity

TODO

Override precedence and associativity

You can use parentheses to cause some parts of an expression to evaluate before other parts. They can override precedence and associativity. ViviFire always evaluates expressions in parentheses before outer expressions. But expressions in parentheses have the usual precedence and associativity, unless you use parentheses in the parentheses. An example follows.

TODO