
7-6
Section
Details of BASIC Commands
154
end
Syntax:
END
Description:
Statement. Terminates program execution and returns to the command mode. All currently open
ports are closed.
Remarks:
END
can be used anywhere in a BASIC program. Like the CLOSE statement, the data remaining in
the output buffer of the communications port is sent and the data in the input buffer of the
communications port is cleared. The END statement can be omitted from the end of the program,
but the ports will not be closed in this case.
Examples:
>
10 INPUT A
>
20 @IF A = 1 THEN GOSUB 1000
>
30 ELSE
>
40 PRINT “A WAS NOT 1”
>
50 ENDIF
>
60 END
>
1000 PRINT “A WAS 1”
>
1010 RETURN
See also:
STOP
eof
Syntax:
EOF
(<port expression>)
Description:
Function. Checks if the input buffer of the specified port is empty..
<port expression> is an expression returning an integer in the range: [1… 3].
EOF
returns -1 if the input buffer of the specified port is empty and 0 not.
Remarks:
Note:
1.
The port specified must be open and configured for input.
2.
Port #3 corresponds to the terminal port of the ASC31.
3.
If Port #3 is specified on the ASC11 or ASC21, an “ILLEGAL FUNCTION CALL”
error (code B005) will result.
Examples:
IF EOF(2) THEN PRINT “PORT 2 IS EMPTY”
See also:
erc
Syntax:
ERC
Description:
Statement. Clears errors from the error history table in the ASCII Unit.
Remarks:
When ERC is executed as a command, all of the errors are cleared from the error history table.
When ERC is executed as a statement in the program, the current error status is cleared and those
current errors are registered in the error history table as old errors.
ERC cannot be used to clear errors 90 to 99 (DM setting errors).
The error code table is a table that records the error codes of up to 30 errors that have occurred in
the ASCII Unit. The error codes indicate the type of error that has occurred. Refer to 9-1 List of
Error Messages for details on error codes.
Examples:
ERC
See also:
ERL
,
ERR
Содержание C200H-ASC11
Страница 1: ...C200H ASC11 ASC21 ASC31 ASCII Units Operation Manual Revised June 2000...
Страница 2: ...iv...
Страница 4: ...vi...