Int Function

Converts a Real number to Integer. Returns the largest integer that is less than or equal to the specified value.

Syntax
Int(number)

Parameters

number
Specify a real number.

Return Values
Returns an Integer value of the real number used in number.

Description
Int(number) takes the value of number and returns the largest integer that is less than or equal to number.

Note


  • For Values Less than 1 (Negative Numbers)

    If the parameter number has a value of less than 1 then the return value have a larger absolute value than number. (For example, if number = -1.35 then -2 will be returned.)


See Also
Abs, Atan, Atan2, Cos, Mod, Not, Sgn, Sin, Sqr, Str$, Tan, Val

Int Function Example
Some simple examples from the Command window are as follows:

> Print Int(5.1)
5
> Print Int(0.2)
0
> Print Int(-5.1)
-6
>