Int

int returns the integer part of a number.

Syntax

 int(NUMERIC_EXPR)

Examples

 FRAC_PI=pi-int(pi) :# returns 0.14159265358...X = int(-pi) :# X = -4Y = int(-5) :# Y = -5

Description

int(X) returns:

The type of result is Integer or Decimal depending whether the result is in the [ -2^31, 2^31-1 ] range.

Associated errors

Error codeDescription
10The argument is not numeric.

See also

fix, ar2, arr, Integer, mod.