Fix

fix truncates the decimals of a number.

Syntax

 fix(NUM_EXPR)

Examples

 X = fix(pi)) : # X value is 3X = fix(-pi) : # X value is -3X = int(pi) : # X value is 3 X = int(-pi) : # X value is -4

Description

fix returns the value of 'X' without the decimals.

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

Associated errors

Error codeDescription
10The argument is not numeric.

See also

int, ar2, arr, Integer, mod.