Stop effects an untrappable run-time error condition with the word “STOP” as the error message. This function implements STOP statement.
Doerr resets the current file (see initio(io)) and if a saved program counter is available it is used to search a list of machine code addresses for the corresponding BASIC code statement. The value found is saved for subsequent use in the implementation of RESUME statements, the ERL variable and error reportage. If error recover is enabled but not already being handled, this function returns after indicating that error recovery is now being handled and clearing the program counter. This last instruction allows doerr to be called directly to implement the ON ERROR GOTO 0 statement in the context of error handling, i.e. to report the previously trapped error.
The various error reporting contexts are implemented via doerr by flushing and closing all files using _reset (see initio(io)) and producing on standard error output the diagnostic message of the form “Error in line line of module module” where error is the message associated with error number passed to runerr, line is the normally the line number as found by doerr and module is the name of the BASIC module in which the error occurred. If basic(1) was invoked with the -L switch, ??? (three question marks) are written in place of line. The process finally terminates with status i. If i is zero, the process terminates with status -1. UNIX normally truncates this status value to an 8 bit value so it will appear as 255.
Err returns the BASIC error number. If no error has occurred, this function returns zero. This function implements the BASIC ERR variable.
Erl returns the BASIC error line number. If no error has occurred or if basic(1) was invoked with the -L switch, this function returns zero. This function implements the BASIC ERL variable.
Ehandl returns non-zero if error handling is occurring and returns zero otherwise. This function supports bend(err).
Errdisable disables error handling. This function supports _reset (see initio(io)) to insure that the user’s program is not executed in case of error.
from The Basmark QuickBASIC Programmer’s Manual by Lawrence Leinweber