FutureBasic Logo

<<    Index    >> FutureBasic 5

int   function

nearestInteger& = int(expr#)

Returns the value of expr# rounded to the nearest integer.

int returns a "long integer" value, which means that expr# should be within the range -2147483648 through +2147483547. To obtain the integer part of numbers which are outside this range, use the fix function. (Note however that fix truncates the fraction part rather than rounding to the nearest integer. In general, fix and int don't return the same values.)

See Also:
fix; frac