34
Remarks:
This command initializes numeric variables to zero and character strings to
empty. It also clears all user functions defined by the DEF FN statement.
This statement must be executed before the ON ERROR GOTO statement.
<size> is automatically set to 200 bytes upon power application or after reset.
COM Statement
Purpose:
To enable, disable, or stop an interrupt defined by the ON COM
GOSUB statement.
Format:
COM[<port number>] ON/OFF/STOP
<port number> is an integer (1 or 2).
Example:
COM1 ON
Remarks:
The COM ON statement enables an interrupt defined by the ON COM GOSUB
statement.
After this statement has been executed, an interrupt will be generated each time
data is written to the specified port buffer. The interrupt will cause program ex-
ecution to branch to a routine defined by the associated ON COM GOSUB state-
ment.
The COM OFF statement disables the com port interrupts. Even if data is written
to a com port buffer, branching will not take place.
The COM STOP statement stops the com port interrupts from branching pro-
gram execution. However, if the COM ON statement is subsequently executed,
branching to the specified interrupt service routine based on the “STOPPED” in-
terrupt will then take place.
If no port number is specified, port 1 is selected as the default port.
Execute the COM OFF statement at the end of the program.
The COM ON/OFF/STOP statement can be executed only after the ON COM
GOSUB statement has been executed.
Program Example:
10
OPEN #2, “COMU:”
20
ON COM2 GOSUB 100
30
COM2 ON
40
GOTO 40
100
IF LOC(2)<>0 THEN A$=INPUT$ (LOC(2), #2)
110
RETURN
DATA Statement
Purpose:
Defines numeric and character constants to be specified in a
subsequent READ statement
Format:
DATA <constant>[,<constant>]...
<constant> may be a numeric constant in any format; i.e.,
fixed-point, floating-point, or integer. <constant> can also be a
character string. Quotes are only necessary if the constant con-
tains comas, colons, or spaces.
Example:
DATA CF, 10, 2.5, “A.:B”
Remarks:
Any number of DATA statements can be used in a program. READ statements
access DATA statements in order (by line number). The data contained therein
Commands, Statements, and Functions
Содержание C500-ASC04
Страница 1: ...C500 ASC04 ASCII Unit Operation Manual Revised February 2001 ...
Страница 5: ...iv ...
Страница 7: ...vi ...