1.7
Priority of the operations
Function
Each operator is assigned a priority. When an expression is evaluated, the operators with the
highest priority are always applied first. Where operators have the same priority, the
evaluation is from left to right.
In arithmetic expressions, the execution order of all the operators can be specified by
parentheses, in order to override the normal priority rules.
Order of operators
From the highest to lowest priority
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
Note
The concatenation operator ":" for Frames must not be used in the same expression as other
operators. A priority level is therefore not required for this operator.
Example: IF statement
If (otto==10) and (anna==20) gotof end
Job planning
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
NOT, B_NOT
*, /, DIV, MOD
+, –
B_AND
B_XOR
B_OR
AND
XOR
OR
<<
==, <>, >, <, >=, <=
Negation, bit-serial negation
Multiplication, division
Addition, subtraction
Bit AND
Bit-serial exclusive OR
Bit-serial OR
AND
Exclusive OR
OR
Concatenation of strings, result type STRING
Comparison operators
Flexible NC programming
1.7 Priority of the operations
73