FIX


Returns the integer part of a number, rounding towards zero

Syntax:
Usage:
result = Fix( number )

Parameters:
number
the floating-point number to truncate

Return Value:
Returns the integer part of number, rounding towards zero.

Description:
Equivalent to: Sgn(number) * Int(Abs(number)). For example, Fix(1.3) will return 1.0, and Fix(-4.9) will return -4.0. For integer types, the number is returned unchanged.

Note: this function is also equivalent to number - Frac(number).

The Fix unary operator can be overloaded with user defined types.

Examples:
Print Fix(1.9)  '' will print  1
Print Fix(-1.9) '' will print -1


Dialect Differences:
Differences from QB:
See also:
Back to Math
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode