FutureBasic Logo

<<    Index    >> FutureBasic

fix   function



Syntax
wholeNum = fix(expr)

Description
This function, using the C function trunc(), accepts a type double input via the provided floating-point expression( expr ) and returns an integral value in a type double. That is, it returns a whole number by stripping off digits to the right of the decimal point.

All the math.incl header C functions, including trunc() are available via the math.incl header. The FB Editor recognizes them and they can be called directly.
Documentation for the math.incl calls can be found in Terminal.app by issuing the 'man' command with the function name (e.g. 'man floor') appended.

See also
frac; int