(Contents)(Previous)(Next)

The Statements CALL, SWITCH, and SWITCHCALL

With the CALL statement a routine (or form) can call other routines (and forms) of the same program:

CALL is a subprogram call: After executing the called module, the processing of the calling module is continued with the next statement after the CALL.

In contrast to CALL, SWITCH...CALL causes a branching to a successor program from where no implicit branching back to the call location takes place.

Examples:

As a further possibility for a program branching, there is the SWITCHCALL statement which is a combination of SWITCH and CALL, as the keyword indicates.

SWITCHCALL branches to another program. In contrast to SWITCH, processing is continued after the SWITCHCALL, when the called program has been terminated. All variables of the program maintain their values.

Example:

In CALL, SWITCH, and SWITCHCALL statements, any expressions can be used instead of the fixed names. To distinguish these expressions from names, they must be preceded by a colon (:).

Examples:

Syntax:


(Contents)(Previous)(Next)