<< Click to Display Table of Contents >> Int (function) |
Int(Num)
Returns the integral part of a numerical expression.
The difference to the Fix function is in the handling of negative numbers: While Int always returns the next integer less than or equal to Num, the function Fix simply removes the part after the decimal point (see example).
See also: Fix
Example:
Sub Main
Print Int( 1.4) ' -> 1
Print Fix( 1.4) ' -> 1
Print Int(-1.4) ' -> -2
Print Fix(-1.4) ' -> -1
End Sub