Directives
ESCAPE Interrupt Program Execution
   
Format ESCAPE [err_val]

Where:

err_val Optional numeric value to be placed in the ERR variable. (ProvideX interprets this as an error code and the system logic kicks in.)
   
Description When you use the ESCAPE directive in Execution mode, ProvideX suspends execution of the current program, lists the current statement (the line number with the ESCAPE directive), and returns you to Command mode. Use the RUN directive to have the program resume where it left off.

You can simplify the debugging process by placing ESCAPE statements strategically in your program. When execution is suspended, you are returned to Command mode, where you can evaluate execution and the values of variables, etc. (up to the line where you placed the ESCAPE in your application).

If you enter ESCAPE in Command mode, ProvideX lists the next statement to be processed, if any. If you specify an error value, the ESCAPE directive will generate an error with that specific error value. Use this to provide an error exit in a multi-line function.

The *ESCAPE label emulates an ESCAPE directive for use as a statement reference.



* Note * When an ESCAPE directive is executed within a program, the system will reset the 'XT' System Parameter in order to avoid accidental session termination.


   
See Also DEF FN Define Function
Labels/Logical Statement References
   
Example

0100 PRINT "BEGIN"; ESCAPE; PRINT "DONE"

When run would yield

BEGIN
0100 PRINT "BEGIN"; ESCAPE; PRINT "DONE"
1> Command mode prompt
Entry of a 'RUN' command would yield: DONE