Difference between revisions of "SET ESCAPE"

From Recital Documentation Wiki
Jump to: navigation, search
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=SET ESCAPE=
 
 
 
==Class==
 
Keyboard Events
 
 
 
 
==Purpose==
 
==Purpose==
 
Toggle action of the interrupt key to halt execution of a program file
 
Toggle action of the interrupt key to halt execution of a program file
Line 15: Line 8:
  
 
==See Also==
 
==See Also==
[[ON ESCAPE]], [[ON KEY]], [[SET DOESCAPE]], [[INKEY()]]
+
[[DEBUG]], [[CANCEL]], [[INKEY()]], [[ON ESCAPE]], [[ON KEY]], [[RESUME]], [[SETCANCEL()]], [[SET COMPILE]], [[SET DEVELOPMENT]], [[SET DOESCAPE]], [[SET STEP]], [[SUSPEND]]
  
  
Line 27: Line 20:
  
 
==Example==
 
==Example==
<pre>
+
<code lang="recital">
 
procedure escape
 
procedure escape
 
set message to "Operation canceled."
 
set message to "Operation canceled."
Line 35: Line 28:
 
do longjob
 
do longjob
 
on escape do escape
 
on escape do escape
do biggerjob</pre>
+
do biggerjob</code>
  
  
 
==Products==
 
==Products==
Recital Terminal Developer
+
Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 
[[Category:Set_Commands|ESCAPE]]
 
[[Category:Set_Commands|ESCAPE]]
 +
[[Category:Keyboard Events]]
 +
[[Category:Keyboard Events Set Commands]]

Latest revision as of 15:45, 23 November 2009

Purpose

Toggle action of the interrupt key to halt execution of a program file


Syntax

SET ESCAPE ON | OFF | (<expL>)


See Also

DEBUG, CANCEL, INKEY(), ON ESCAPE, ON KEY, RESUME, SETCANCEL(), SET COMPILE, SET DEVELOPMENT, SET DOESCAPE, SET STEP, SUSPEND


Description

If SET ESCAPE is ON, then pressing the interrupt key will cause the current program to be halted. If the current command being executed at the time of the interrupt key being pressed was entered in interactive mode, then the command is canceled.

If a program is executing, then the pop-up debugger is activated. If you choose the Cancel option, control will return to the ’>’ prompt. If you choose the Suspend option, execution of the program is suspended. You can then enter interactive commands at the ’>’ prompt, and resume operation of the program with the RESUME command. If you choose the Ignore option, then program execution continues as if no interrupt had occurred.

The SET DOESCAPE command can be used to cancel only the current command during the execution of a program. The interrupt key can be trapped with the ON ESCAPE command. By default, ESCAPE is ON.


Example

procedure escape
set message to "Operation canceled."
return to master
 
set escape on
do longjob
on escape do escape
do biggerjob


Products

Recital