Difference between revisions of "SUSPEND"

From Recital Documentation Wiki
Jump to: navigation, search
Line 37: Line 37:
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 +
[[Category:Error Handling and Debugging]]
 +
[[Category:Error Handling and Debugging Commands]]

Revision as of 15:07, 1 June 2009

Class

Error Handling and Debugging


Purpose

Suspend program execution


Syntax

SUSPEND


See Also

CANCEL, LIST HISTORY, RESUME, SET DEBUG, SET DOHISTORY, SET ECHO, SET ESCAPE, SET HISTORY, SET STEP


Description

The SUSPEND command suspends the execution of a program, and returns control to the ">" prompt. Current memory variables are not released, and all files currently open are not closed. When a program has been suspended, you can execute Recital/4GL commands at the ">" prompt to help you in program debugging. Memory variables can be inspected and updated if required.

Program execution continues when the RESUME command is issued. If SET ESCAPE is ON, and the interrupt key is pressed, the Recital/4GL allows you to suspend program execution at that point. When debugging a program in single step mode, with the SET STEP ON command, you can also choose when you want to suspend program execution. The SET HISTORY command and the SET DOHISTORY command can be used in conjunction with SUSPEND to provide an execution 'trace' of the program. When a program is suspended, you can cancel it altogether by issuing the CANCEL command.

You cannot SUSPEND in a runtime environment. If a SUSPEND command is encountered, program execution terminates and the user is returned to the operating system.


Example

set history to 500
set history on
set dohistory on
on error suspend
do testprg


Products

Recital Terminal Developer