SUSPEND

From Recital Documentation Wiki
Revision as of 16:19, 25 November 2009 by Helengeorge (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Purpose

Suspend program execution


Syntax

SUSPEND


See Also

CANCEL, DEBUG, DISPLAY BREAKPOINT, DISPLAY CALLS, DISPLAY MEMORY, DISPLAY STATUS, DISPLAY WATCHPOINT, LIST BREAKPOINT, LIST CALLS, LIST HISTORY, LIST MEMORY, LIST STATUS, LIST WATCHPOINT, 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