toint()

Converts the input to an integer value (signed 32-bit) number representation.

Note

Prefer using int() when possible.

Syntax

toint(value)

Parameters

Name Type Required Description
value scalar The value to convert to an integer.

Returns

If the conversion is successful, the result will be an integer. Otherwise, the result will be null.

Example

print toint("123") == 123

Output

print_0
true