ON COMMS¶
Function¶
ON COMMS allows communication errors (typically a protocol failure) to be handled by the user’s application program.
Syntax¶
ON COMMS GOTO [line no]
or
ON COMMS OFF
Examples¶
ON COMMS GOTO 1000
ON COMMS OFF
Remarks¶
The statement operates in a similar manner to ON POWER.
When a communications error is detected, control is returned to the Basic Interpreter. Execution continues from a defined line number specified in the Basic program.
In order to allow normal communication error messages the statement ON
COMMS OFF disables this mode. The byte of memory COMERR
is available
to the programmer and contains a code which represents the type of error
which has occurred in the communications. The available codes and their
meaning are described more fully in Communication Error.
In a typical application, ON COMMS would be used to present the Operator with a plain language statement of the form:
“Communications have failed. Please re-dial and try again”.
Re-tries or repeat blocks can also be controlled by the user program, as required.