Skip to content

INT

Integer

This numeric function returns the whole number portion of a numeric value without rounding and maintains its sign (+/-).

INT (numeric-value [,ERR=line-ref|,ERC=error-code])
numeric-value
is any number.
line-ref
is the program line number to branch to if an error is produced by this function.
error-code
is a programmer-defined error code. Valid values are positive or negative whole numbers.
INT (34.23)

returns the value 34.

INT (X)

If X = 3.56, returns the value 3; if X = .234E45, returns the value .234E45.

INT (-65.3)

returns the value -65.

INT (S/3)

If S = 100, returns the value 33.

LET Y = INT (U/2)

If U = 25, assigns Y the value 12.

INT (.999999)

returns the value 0.

FIX and FPT functions

From the Thoroughbred Basic Language Reference, Volume II: F–Q, version 8.9.1. Open this page in the PDF