CINT
Function
Syntax
Remarks
Example
7-36
Converts any numeric argument to an integer
by rounding the fractional portion.
CINT (numexp)
If
"numexp" is not in the range -32768 to
32767, an "Overflow" error occurs.
If
the fractional portion of "numexp" is
>=.5
the integer part is rounded up; otherwise a
truncation occurs.
See the CDBL and CSNG functions for details
on converting numbers to the double precision
and single precision data type, respectively.
See also the FIX and INT functions, both of
which return integers.
Ok
PRINT CINT(45.67)
46
Ok
PRINT CINT(-3.71)
-4
Ok