ETAS 4 Calculated Signals
implicitly using the precedence of the operators. Higher precedence operators
are evaluated first, followed by lower precedence. Within the same precedence
group, operations are evaluated from left to right or from right to left depending
on the operator.
Examples:
l
a + b + c = (a + b) + c
l
a + b * c = a + (b * c)
l
- - a = -(-a)
l
cond1? val1: cond2? val2: val3 = cond1? val1:
(cond2? val2: val3)
The following table shows the precedence of operators. The operators on the
first line have the highest precedence. Operators on the same line have the
same precedence and the evaluation direction is specified as left-to-right or
right-to-left.
Operators Arguments Evaluation
- ~ ! unary Right-to-left
** binary Left-to-right
* / % binary Left-to-right
+ - binary Left-to-right
< > <= >= = binary Left-to-right
BIT_AND & binary Left-to-right
BIT_XOR ^ binary Left-to-right
BIT_OR | binary Left-to-right
AND && binary Left-to-right
XOR ^^ binary Left-to-right
OR || binary Left-to-right
?: ternary Right-to-left
, binary Left-to-right
For details of the operators, see the toolbox in the calculated signals editor.
4.4.3 Reduction
A reduction function is a function that takes a sequence of values and calculates
a single result value, the reduction.
reduction = Reduce(value[1], …, value[n])
Examples:
MDA V8.5 - User Guide 67