INT                                                                          Function

INT(number)

Description

INT removes the fractional part of a number, returning the next smallest integer. The required parameter, number, is any valid numeric expression.

Example

REM INT Example

'INT converts floats to the next smallestint

DIM Pos, Neg

Pos = ATN(1) * 4

Neg = -Pos

PRINT "INT(pi) = " & INT(Pos)

PRINT "INT(-pi) = " & INT(Neg)

Output

INT(pi) = 3

INT(-pi) = -4

Related Items

FIX