Data Type Conversion
Data type conversions
The following table shows conversion possibilities among individual data types in D2000 system. The character "N" means that the conversion of the type in the given row to the type in the given column is not possible. The character "Y" means, that the conversion is possible and the conversion result is shown in the parenthesis.
B - (Boolean) logical value
I - Integer value
R - Real value
Ta - Absolute Time
Tr - Relative Time
| B | I | R | Ta | Tr |
|---|---|---|---|---|---|
B | × | Y (0,1) | *Y (0.0, 1.0) | N | N |
I | N | × | Y (same value) | N | Y (seconds) |
R | N | Y (rounding) | × | N | Y (seconds, milliseconds) |
Ta | N | N | N | × | **N |
Tr | N | Y (seconds) | Y (seconds, milliseconds) | N | × |
* R=(B+B)*1.0
** Ta-Ta=Tr
Note
Change of operand value type to Integer is performed by multiplying the value by the number 1 (value * 1).
Change of operand value type is performed by multiplying the value by the number 1.0 (value * 1.0).