Int
Returns the integer portion of a number.
Syntax
Int(<value>)
Parameters
<value>
Type: Double
A numeric value.
(return)
Type: Long
The greatest integer that is less than or equal to <value>.
Notes
An error occurs if <value> is outside the range of integer values that can be stored in the Long data type (-2,147,483,648 to 2,147,483,647). If the current data value is NULL, <value> is 0.0 and the return value is 0.
This function is similar to the Int function in VBScript.
Example
The following mrScriptBasic example uses the Int function to return the integer portion of a number:
Dim MyInteger1, MyInteger2, MyInteger3
MyInteger1 = Int(9.88) ' Returns 9
MyInteger2 = Int(-9.88) ' Returns -10
MyInteger3 = Int(12345678901234.89) ' Error
See also