AT&T 6300 Programmer's Manual page 192

Gwbasic by microsoft
Hide thumbs Also See for 6300:
Table of Contents

Advertisement

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

Advertisement

Table of Contents
loading

Table of Contents