
7-6
Section
Details of BASIC Commands
145
cint
Syntax:
CINT
(<numerical expression>)
Description:
Function. Converts the <numerical expression> into an integer.
<numerical expression> may be any integer, single-precision floating point or double-precision
floating point. the valid range of the input is the valid range of a short integer:
[-32768... 32767]
Remarks:
Note:
1.
Fractions are rounded up if positive and down if negative. For instance,
CINT
(67.5)
returns 68 but
CINT
(-67.5) returns -68 not -67.
Examples:
> 10 A% = CINT(67.45)
> 20 B% = CINT(67.55)
> 30 PRINT A%, B%
> RUN
67
68
See also:
CDBL
,
CLNG
,
CSNG
,
FIX
,
INT
clear
Syntax:
CLEAR
Description:
Statement. Initializes all numeric and character variables.
All numerical variables are initialized to 0. All character strings are initialized to be empty.
Remarks:
Note:
Refer to 7-2 Character Variable Space Allocations for details on allocating space in the
character variable area.
Dynamic Method:
1.
All values = 0. Delete all temporary memory blocks.
2.
Close all open ports.
3.
For character variables, all temporary-holding areas will be reset.
Static Method:
1.
Close all ports that are open and set all values to 0.
2.
Fixed memory areas in user memory will remain held, but the values within these
areas will be cleared.
Examples:
CLEAR
See also:
clng
Syntax:
CLNG
(<numerical expression>)
Description:
Function. Converts the <numerical expression> into a long integer.
<numerical expression> may be any integer, single-precision floating point or double-precision
floating point. the valid range of the input is the valid range of a long integer:
[-2147483648... 2147483647]
Remarks:
Note:
1.
Fractions are rounded up if positive and down if negative. For instance,
CLNG
(67.5)
returns 68 but
CLNG
(-67.5) returns -68 not -67.
Examples:
10 A&= CLNG(40000.45)
20 B&= CLNG(40000.55)
30 PRINT A&, B&
> RUN
40000
40001
See also:
CDBL
,
CINT
,
CSNG
,
FIX
,
INT
Summary of Contents for C200H-ASC11
Page 1: ...C200H ASC11 ASC21 ASC31 ASCII Units Operation Manual Revised June 2000...
Page 2: ...iv...
Page 4: ...vi...