LOTUSSCRIPT LANGUAGE


Fix function
Example

Returns the integer part of a number.

Syntax

Fix ( numExpr )

Elements

numExpr


Return value

Fix returns the value of its argument with the fractional part removed. The data type of the return value is determined by the data type of numExpr. The following table shows special cases.

numExprReturn value
NULLNULL
Variant containing a string interpretable as a numberDouble
Variant containing a date/time valueThe date part of the value

Usage

The Fix function rounds toward 0:


The Fix function and the Int function behave differently. The return value from Int is always less than or equal to its argument.

Tip It is always true that Fix(numExpr) + fraction(numExpr) = numExpr.

Example
See Also