# Operator precedence

If several operations occur in an expression, then each part is evaluated and resolved in a predetermined order called operator precedence. You can use parentheses to override the order of precedence and force some parts of an expression to be evaluated before others. Operations within parentheses are always performed before those outside. Within parentheses, however, standard operator precedence is maintained.
If expressions contain operators from more than one category, then arithmetic operators are evaluated first, then comparison operators are evaluated next, and logical operators are evaluated last. Comparison operators all have equal precedence; i.e. they are evaluated in the left to the right order in which they appear. Arithmetic and logical operators are evaluated in the following order of precedence:

Arithmetic Comparison Logical
Exponentiation (^) Equality (=) Not
Unary negation (-) Inequality (<>) And
Multiplication (*) and Division (/) less than (<) Or
Integer division (\) greater than (>) Xor
Modulus arithmetic (Mod) less or equal (<=) Eqv
Addition (+) and Subtraction (-) greater or equal (>=) Imp
Concatenation (&) Is
If multiplication and division occur together in an expression, then each operation is evaluated as it occurs from left to right. Likewise, if addition and subtraction occur together in an expression, then each operation is evaluated in order of appearance from left to right. The string concatenation (&) operator is not an arithmetic operator, but in precedence it does fall after all arithmetic operators and before all comparison operators. The Is operator is an object reference comparison operator. It does not compare objects or their values; it checks only to determine if two object references refer to the same object.
PROMOTIC 9.0.21 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person

- And
- Eqv
- Imp
- Is
- Mod
- Not
- Or
- Operator precedence

- Xor
© MICROSYS, spol. s r. o.