ETAS 4 Calculated Signals
3
Events are currently treated as strings.
4.4.1.1 Data Type Conversion
Values of one type can sometimes be converted to a different type according to
the following table:
Conversion Input Type Output Type Result
Convert_ToBool(x) Numeric Boolean True if x != 0;
false oth-
erwise
Convert_ToBool(x) Boolean Boolean x
Convert_ToDouble(x) Numeric 64-bit float The closest
number to x
representable
as a 64-bit
floating point
number
Convert_ToDouble(x) Boolean 64-bit float 1 if x is true; 0
otherwise
4.4.1.2 Data Type Deduction
Input signals have a defined type as can be seen in the type column of the Vari-
able Explorer. The types of intermediate results of a calculation formula are
chosen automatically depending on the input types and the applied operations.
This process is called type deduction.
Internally, a calculation operation is represented by multiple implementations
each with specific types for the inputs and outputs of the operation: the type
combinations. Type deduction works by choosing a type combination that
matches the inputs. Inputs may be converted to similar larger types if no exact
match can be found:
l Signed integer to larger signed integer
l Unsigned integer to larger unsigned integer
l Any integer to 64-bit float
l Boolean to any numeric
Examples:
l Bit operations exist for signed and unsigned integers of all sizes. Type
deduction chooses the smallest size that is greater or equal than all
inputs.
l Arithmetic operations (plus, times, …) only exist in double so type deduc-
tion will always convert inputs to double.
MDA V8.5 - User Guide 64