BOOL_TO conversions

Converting from the BOOL type variable to a different type: For number type variables the result is 1 when the operand is TRUE and 0 when the operand is FALSE. The result is "TRUE" or "FALSE" respectively for STRING type variables.

Examples in ST:

i:=BOOL_TO_INT(TRUE); (* Result is 1 *)

str:=BOOL_TO_STRING(TRUE); (* Result is 'TRUE' *)

t:=BOOL_TO_TIME(TRUE); (* Result is T#1ms *)

tof:=BOOL_TO_TOD(TRUE); (* Result is TOD#00:00:00.001 *)

dat:=BOOL_TO_DATE(FALSE); (* Result is D#1970-01-01 *)

dandt:=BOOL_TO_DT(TRUE); (* Result is DT#1970-01-01-00:00:01 *)