FIX
Returns an integer by truncating the decimal part of a floating-point number, somewhat like "floor"
Implemented by: decbasic, level2, colorext, GWBASIC, MSX, bw32, ABasiC, QBasic, VBDOS, FreeBASIC, Gambas, minibasicjs
With variations:
Also written as:
Usage
FIX simply truncates whatever goes after the decimal point of a real number. For positive values this looks pretty much as floor function which returns the immediately lesser integer number, but for negative values it plays an enormous difference because the returned value will be the immediately greater integer. For a "true floor" function, see INT.
Variations
Examples
Comments
Related keywords
Similar keywords
- CINT was implemented like FIX in Bywater BASIC versions 2.x, but both keywords were implemented with their common behaviours in version 3.20.