-

TO_BOOL

Type Function
Description The overloaded function TO_BOOL converts an input value of various data types into an output value of the data type BOOL (see description of the input for the supported data types).
Parameters Input

IN

Output

OUT
Conversion rules
  • Conversion of numeric data types - The input value 0 results in the output value FALSE. For any input value unequal to 0, the value TRUE is stored in the Boolean output variable.
  • Conversion of bit data types - The data type conversion is done as binary transfer. The rightmost bit of the input value is stored in the Boolean output value (value 0 of the rightmost bit results in FALSE and 1 results in TRUE).
  • For an input value that is not a real number (NaN) or a positive (Inf+) or negative infinity (Inf-) value, the value TRUE is returned.
Additional information EN/ENO behavior