Int

From NSB App Studio
Revision as of 13:31, 5 July 2012 by Brendon (talk | contribs) (Created page with "INT(''number'') '''Description''' INT removes the fractional part of a number, returning the next smallest integer. The required parameter, ''number'', is any valid numeric ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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