Formula Syntax; Literals - ETAS MDA V8.6 User Manual

Table of Contents

Advertisement

ETAS
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:
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
l
Examples:
Bit operations exist for signed and unsigned integers of all sizes. Type
l
deduction chooses the smallest size that is greater or equal than all
inputs.
Arithmetic operations (plus, times, ...) only exist in double so type deduc-
l
tion will always convert inputs to double.
4.4.2

Formula Syntax

Formulas are entered in textual form. A formula consists of the following types
of elements:
Literals: a constant value directly part of the formula, e.g. 1
l
Signals: a reference to an existing signal, represented by a box
l
Operators: a non-alphanumeric sequence of characters representing a
l
calculation operation e.g. +
Functions: e.g. sin()
l
4.4.2.1

Literals

A literal is the textual representation of a constant in a formula. The following
types of literals can be used:
Type
Decimal integer number
Decimal floating point number 1.23
Hexadecimal number
Binary number (e.g. bitmask)
"Integer Numbers" on the next page
l
"Floating Point Numbers" on the next page
l
"Boolean" on the next page
l
MDA V8.6 – User Guide
Example
123
0x1FA, 0x1fa
0b1001010
4 Calculated Signals
70

Advertisement

Table of Contents
loading

Table of Contents