FIX function

Purpose

Truncate a floating-point number to an integral value.

Syntax

y = FIX(numeric_expression)

Remarks

FIX strips off the fractional part of its argument, and returns the integer part.  Unlike CINT and INT, FIX does not perform any form of rounding or scaling.

See also

CEIL, CINT, INT, FRAC, ROUND

Example

x$ = "The integer part of 50.67 is" + STR$(FIX(50.67))

y$ = STR$(FIX(-1.1)) & ", " & STR$(INT(-1.1)) & ", " & STR$(CINT(-1.1))

Output  The integer part of 50.67 is 50

-1, -2, -1