FIX( number )
Truncate a number to a whole number by eliminating the decimal point and all characters to the right of the decimal point.
For example 9.89 will return 9 and -2.11 will return -2.
The major difference between FIX and INT is that FIX provides a true integer function (ie, does not return the next lower number for negative numbers as INT() does). This behavior is for Microsoft compatibility.
PRINT FIX(12.6)
12
PRINT FIX(-12.6)
-12
PRINT INT(12.6)
12
PRINT INT(-12.6)
-13
See also:
ABS
CINT
EXP
INT
SGN
Applies to:
CGCOLORMAX
CGMMSTICK
CGMICROBOARD
CGMICROMITE
Leave a Reply