Operator Precedence

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

Precedence sequence

Primary
( )
Unary
+, -, Not
Arithmetic
^
*, /, Mod, Rem
+, - (binary)
String Concatenation
&, ;
Bit Shift
SHL, SHR
Comparison
<, <=, >, >=, =, <>, Is
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