AT&T 6300 Programmer's Manual page 365

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

Advertisement

Syntax
linenum
Remarks
ON ERROR GOTO
Statement
Enables error trapping and specifies the first
line number of a subroutine to be executed if
an error occurs.
The ON ERROR GOTO statement is only used
in a program.
ON ERROR GOTO linenum
is the first line number of the error trapping routine
To Enable or Disable ERROR Trapping
ON ERROR GOTO
n
ERROR trapping is enabled
ON ERROR GOTO 0
ERROR trapping is
disabled. Subsequent errors
print an error message and
halt execution.
If
ERROR trapping is enabled and a GWBASIC
error (or a user defined error) is found,
.
the ON ERROR GOTO line will be executed
and the corresponding routine activated. The
ERL and ERR functions are usually used in
IF...GOTO...ELSE or IF...THEN...ELSE
statements to direct program flow within an
error trapping routine.
7-209

Advertisement

Table of Contents
loading

Table of Contents