Home / lang / int 
Int
Syntax
Value = Int ( Number )

Returns the mathematical integer part of Number, i.e. the greatest integer which is less than Number.

Example
PRINT Int(Pi)

3
Example
PRINT Int(-Pi)

-4

The Value is not limited to the Integer size (32 bits) nor to the Long size (64 bits). It may be Float.

Example
PRINT Int(2e60), CInt(2e60)

2E+60 -2147483648

The next example shows how Int() works on a Boolean variable.

Example
PRINT Int(TRUE)

True

The Difference between Int() and CInt() is:


See also
Arithmetical Functions