Interrupting Program Execution

There are times when you may want to interrupt the executing program and return to console mode. This is known as ESCAPING. On earlier Business BASICs the ESCAPE key on the keyboard was used to do this, hence the term ESCAPING. However, because PRO/5 runs on so many different computer systems, the applicable key on your keyboard may be something other than ESCAPE (the host operating system decides which key, PRO/5 must play along). Check your system user manuals. Other common choices for interrupt keys are BREAK, ^C, ^BREAK (MS-DOS), and DEL.

When you interrupt program execution, PRO/5 displays the line that was interrupted and then gives the ">" prompt, indicating that it is in console mode.

The user must be careful when interrupting a program, as the program may have begun a critical file operation that should be completed. The program may "trap" interrupts with the SETESC verb to ensure completion of critical processing. For more information, see the SETESC verb. The program may also restrict console mode with a password. For more information about this option, see the STBL("!CON*") global strings in STBL Formats - BBj.

Continuing Program Execution After Interruption

Program execution may be interrupted for various reasons. You may request an interrupt by "ESCAPING" (see above). The program itself may request an interruption (using the ESCAPE verb). Finally, PRO/5 may decide to interrupt the program if an error occurred that the program could not understand. In any case PRO/5 enters console mode. If you want to resume execution of the program at the point of interruption then simply enter the RUN verb.

NOTE: Unlike some other BASICs, the RUN verb does not automatically start at the beginning of the program and does not clear or reset any data.

If you want to restart the program at the beginning with all data reset, then you should enter:


Finally, if you want to continue execution at some other line while retaining the current data, you must first enter a GOTO statement. For example, the following will continue execution at line 1000:

GOTO 1000