qb45advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
RESUME Statement Details
  QuickSCREEN      Details      Example      Contents      Index
──────────────────────────────────────────────────────────────────────────────
RESUME Statement Details
 
Syntax
  RESUME [0]
  RESUME NEXT
  RESUME {linelabel | linenumber}
 
The different forms of the RESUME statement redirect program flow as
described in the following list:
 
  Statement           Where Execution Resumes
  RESUME [0]          At the last statement executed in the module
                      containing the error handler that was used.
                      If an active error handler is found in the
                      module where the error occurs, execution
                      resumes with the statement that caused the
                      error.
  RESUME NEXT         At the statement immediately following the last
                      statement executed in the module containing the
                      error handler that was used.
                      If an active error handler is found in the
                      module where the error occurs, execution resumes
                      with the statement immediately following the
                      statement that caused the error.
  RESUME linelabel    At linelabel
  RESUME linenumber   At linenumber
 
A RESUME statement that is not in an error-handling routine produces
the error message "RESUME without error." Reaching the end of an
error-handling routine without finding RESUME produces the error
message "No RESUME."
 
The line specified in a RESUME { linelabel | linenumber } statement
must be defined at the module level. As a rule, avoid using a line
label with a RESUME statement. Omitting the line label allows your
program to continue no matter where the error occurred.
 
  Note: Programs containing error-handling routines must be compiled
        with either the /E (On Error) or /X (Resume Next) options when
        you are compiling from the BC command line. No options are
        required when compiling in the QuickBASIC environment, or using
        the Make EXE command from the QuickBASIC Run menu.
 
Differences from BASICA
 
In BASICA, if an error occurs in a DEF FN function, both RESUME and
RESUME NEXT attempt to resume program execution at the line containing
the function.