Documentation

ST language operators

In the ST language, an expression consists of operators and operands. Operands are literals, enumeration types, variables, function calls with values, method calls with values, or  function block calls with values.

Operator Description Example Priority
() Parentheses (A+B)/C 11 (highest)
Evaluation of a function or of a method Identifier LN(A) 10
^ Dereference R^ 9
- Negation -A 8
+ Unary plus +B 8
NOT Negation NOT C 8
** Exponentiation A**B 7
* Multiplication A*B 6
/ Division A/B 6
MOD Modulo A MOD B 6
+ Adding A+B 5
- Subtracting A-B 5
< , > , <= , >= Comparison A<B 4
= Equality A=B 4
<> Inequality A<>B 4
AND, & Logical AND A AND B 3
XOR Logical exclusive OR A XOR B 2
OR Logical OR A OR B 1