![SEW-Eurodrive IPOS plus Manual Download Page 195](http://html1.mh-extra.com/html/sew-eurodrive/ipos-plus/ipos-plus_manual_1250042195.webp)
Manual – IPOSplus®
195
15
Unary operators
Compiler – Operators
Category 1 has the highest priority, category 2 (unary operators) has the second highest
priority, etc. The comma operator has the lowest priority.
Operators in the same category have the same ranking.
The unary operators (category 2), conditional operators (category 13) and assignment
operators (category 14) assign from right to left; all others assign from left to right.
The operator for multiplication (*) is ranked before the operator for addition (+), so mul-
tiplication is performed before addition in the following statement:
H1 is assigned the value 29.
Brackets have to be used if the addition is to be performed before the multiplication:
H1 is assigned the value 108 (from 3 * 9 * 4).
15.2 Unary operators
Unary operators are operators positioned before or after an operand and only influence
this operand.
H1 = 3 * 7 + 2 * 4;
H1 = 3 * ( 7 + 2 ) * 4;
INFORMATION
The sequence can be forced by brackets to ensure the sequence of operations is as
you require it. Nested brackets are permitted. Superfluous brackets have no effect on
the program function.
H1 = -H2; // The unary minus operator (-) forms the value of H2 with a changed sign
H1 = ~H2; // The unary complement operator (~) forms the bit-by-bit complement of H2
++H3 //, the pre-increment operator (++) increases the value of H3 by one
P
i
f
kVA
Hz
n
P
i
f
kVA
Hz
n