BOOL_TO-Konvertierungen

Konvertierung vom Typ BOOL zu einem anderen Typ: Bei Zahlentypen ist das Ergebnis 1, wenn der Operand TRUE ist, und 0, wenn der Operand FALSE ist. Beim Typ STRING ist das Ergebnis 'TRUE' bzw. 'FALSE'.

Beispiele in ST:

i:=BOOL_TO_INT(TRUE); (* Ergebnis ist 1
*)

str:=BOOL_TO_STRING(TRUE); (* Ergebnis ist 'TRUE' *)

t:=BOOL_TO_TIME(TRUE); (* Ergebnis ist T#1ms *)

tof:=BOOL_TO_TOD(TRUE); (* Ergebnis ist TOD#00:00:00.001 *)

dat:=BOOL_TO_DATE(FALSE); (* Ergebnis ist D#1970-01-01 *)

dandt:=BOOL_TO_DT(TRUE); (* Ergebnis ist DT#1970-01-01-00:00:01
*)