ESCON
Escape Trapping On
This directive enables program escape trapping specified by the SETESC directive and reverses the effects of the ESCOFF directive. The default condition when Thoroughbred Basic is initiated is the ESCON condition.
Syntax
Section titled “Syntax”ESCONRemarks
Section titled “Remarks”The primary use of this directive is to reverse the effects of the ESCOFF directive that is used principally in debugging mode. This is normally not found in the program code itself, but is used in Thoroughbred Basic Console Mode to restore normal Escape key trapping that has been disabled with the ESCOFF directive.
Examples
Section titled “Examples”00100 BEGIN00110 SETTRACE00120 SETESC 0100000130 ESCOFF00140 WAIT 100; REM "Press Escape key"00150 ESCON00160 WAIT 100; REM "Press Escape key again"
00200 ESCOFF00210 SETESC 0200000220 ESCON00230 WAIT 100; REM "Press Escape key one more time"
01000 PRINT "Escape trapped at 01000"01010 GOTO 00200
02000 PRINT "Escape trapped at 02000"shows how this directive functions:
- Pressing the Escape key when line 00140 lists to the screen causes a program interruption and places you in Thoroughbred Basic Console Mode even though line 00120 had a SETESC directive.
2 Type RUN and press the Enter key. The program continues at line 00150, where the
ESCON directive turns on Escape key processing.
- Pressing the Escape key when line 00160 lists to the screen causes the program to branch to 01000, indicating that the SETESC is once again active and that the ESCOFF directive did not change the program line number or label set by the SETESC directive.
- Pressing the Escape key when line 00230 lists to the screen causes a branch to 02000, indicating that the SETESC directive at line 00210 (executed after the ESCOFF at line 00200) is still able to change the program line number for Escape key processing.
See also
Section titled “See also”From the Thoroughbred Basic Language Reference, Volume I: A–E, version 8.9.1. Open this page in the PDF