TOINT

Format

TOINT(string)

Function

Arguments

string
The string to convert.

Return value

Related

Version

Example

_i = '100' // Assign a string
_j = _i + 1
_j // The string "1001" is output.

_i = '100' // Assign a string
_j = TOINT( _i ) + 1 // Convert to an integer
_j // The integer 101 is output
_i = 1.1 // Assign a real number
_j = TOINT( _i )
_j // The integer 1 is output

_i = -1.1 // What about negative values?
_j = TOINT( _i )
_j // The integer -1 is output ※From Tc542-4 onwards