User guide

34
VTB USER GUIDE
7.2 Notes on Expressions
VTB manages the mathematical expressions completely. Anyway we have to make WARNING when in the expression
there are INTEGER variables together FLOAT variables. We have to remind these rules:
1) If in the expression there is at least one variable of type FLOAT all the expression is calculated in FLOAT;
2) If the result of an expression must be FLOAT at least one variable in the expression must be FLOAT;
Look at this example:
A=10
B=4
R=A/B
According to the type of the variables VTB calculates the following results:
A
B
R
LONG
LONG
FLOAT
2
FLOAT
LONG
FLOAT
2,5
FLOAT
FLOAT
LONG
2
Enabling the Warning level of the compiler, some messages will be displayed in coincidence with the possibility of data
truncation.