The following table lists all of the built-in operators, according to the order of precedence.
Operator |
Precedence 1=highest |
Description |
^ |
1 |
Raise to power, e.g. 5^3 is 5 to the 3rd power or 125 |
** |
1 |
Equivalent to ^ |
+ |
2 |
Unary plus |
- |
2 |
Unary minus |
* |
3 |
Multiplication |
/ |
3 |
Division |
+ |
4 |
Addition or string concatenation |
#+ |
4 |
Explicit addition; see Explicit Plus Operators |
$+ |
4 |
Explicit concatenation; see Explicit Plus Operators |
- |
4 |
Subtraction |
= |
5 |
Relational equals, e.g. IF A = B OR C = D THEN ... |
< |
5 |
Relational less than; string or numeric |
<= |
5 |
Relational less than or equals; string or numeric |
> |
5 |
Relational greater than; string or numeric |
>= |
5 |
Relational greater than or equals; string or numeric |
<> |
5 |
Relational not equal; string or numeric |
# |
5 |
Relational not equal; same as <> |
NOT |
6 |
Logical NOT, e.g. IF NOT (A OR B) THEN ... |
AND |
7 |
Logical AND |
OR |
7 |
Logical OR |
XOR |
7 |
Logical XOR; exclusive OR |
EQV |
7 |
Logical equivalence; exclusive NOR |
MIN |
7 |
Minimum (of two operands), e.g. A = B MIN C + D |
MAX |
7 |
Maximum (of two operands), e.g. A = B + C MAX D + E |
MOD |
7 |
Modulo, e.g. A = 37 MOD 8 (remainder of 37 / 8) |
USING |
8 |
Formatting, e.g. A USING "###.##" |