Int

From NSB App Studio
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This function is for BASIC compatibility. It is not available in pure JavaScript projects.

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 (Basic)

Rem Int Example
'Int converts floats to the next smallest integer
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