Once the entire procedure has been read in and analyzed, the procedure is started up and the individual commands are executed.
First, the expressions are replaced within the command (= expression replacement); then the command is analyzed and, finally, executed.
In the case of expression replacement, some restrictions must be noted as a result of the sequence of processing steps described here. These are described in section “Expression replacement”.
Procedure execution
The execution of S procedures is controlled within the procedures by means of control structures. The internal control of procedure execution also includes intercepting and evaluating errors so that procedure execution can then be correctly terminated or resumed. Other important aspects of procedure execution are logging and procedure interruption. Whereas control structures, logging and error handling can play an important part in both foreground and background procedures, only procedures that are called in the foreground can be interrupted.
Control structures are loops or branches that are implemented as command blocks. Each structure is initiated and terminated by a pair of associated control flow commands. Branch commands also belong to the control flow commands. The concept of control structures or control flow commands applies equally to procedures that are called in the foreground and in the background. This is described in chapter “Creating S procedures”. For a detailed description of the commands, see chapter “SDF-P commands”.