next up previous contents index
Next: Error Recovery Up: SIC as a programming Previous: Structured Programming and Logical   Contents   Index

Execution Level

Procedures and Loops can be nested. Hence, SIC may operate at different Levels of Execution. Commands are provided to activate some level (@, FOR), suspend (PAUSE), resume (CONTINUE) or abort its execution (NEXT, QUIT, BREAK, RETURN). Errors occuring within a non-interactive execution level generate a PAUSE, which returns interactive control to the user at a level immediately higher. The prompt at level I changes to 'SIC_I> ' to remind the user what SIC is doing.

It is also possible to interrupt a sequence of commands (procedure or loop) by pressing <^C> at any time. The current command is then normally completed (unless it traps the <^C> by itself), but a PAUSE is generated when the command terminates.

Related commands :

BREAK
Aborts Loop execution without generating an error. The loop is considered to have completed successfully, and execution resumes at the command line following the NEXT command of the loop.
CONTINUE
resumes Procedure or Loop execution after a PAUSE, either explicit or generated because of an error condition. C is always a non ambiguous abbreviation of CONTINUE, unless you redefine it as a Symbol.
EXIT
exit from the program.
NEXT
The effect of this command depends on the context:
PAUSE
sets a break point in the Loop or a Procedure. PAUSE returns control to the user when executed in any of the non-interactive modes (Loop and Procedures). Any valid command can be executed while in interrupt mode. The normal execution of the interrupted level can be resumed by typing CONTINUE. NEXT and QUIT may also be valid continuation sequences. The PAUSE command can be followed by a character string argument which is printed before the PAUSE becomes effective.
QUIT
If QUIT is typed after a PAUSE occured in a Procedure or Loop, the execution of the interrupted procedure is aborted, and one returns to the previous level of execution. In this case, an error condition is transmitted to the previous level to allow the user to take the appropriate decision.
RETURN
Terminates procedure execution, and returns to the previous level of execution. An implicit RETURN is always executed at the end of the command file. Command RETURN BASE returns to the normal interactive level (level 0). Command RETURN ERROR returns to the previous level of execution, but also transmit an error status to this level.


next up previous contents index
Next: Error Recovery Up: SIC as a programming Previous: Structured Programming and Logical   Contents   Index
Gildas manager 2014-07-01