TO_INT¶
Info
New in Atfinity 17.
Description¶
TO_INT converts a value to an integer.
Decimals, and decimal strings like '7.9', are truncated towards zero.
Numbers with a unit are converted to their plain number, dropping the unit.
A value that cannot be converted returns unknown.
Syntax¶
Returns: an integer, or unknown if the value cannot be converted.
Example¶
This returns 42.
This returns 7 (TO_INT('7.9') also returns 7).
This returns unknown.