Initiating Processes from ALGOL

An ALGOL program can initiate any procedure, including imported library procedures, passed external procedures, and separate programs. However, if a typed procedure is initiated, the returned value is discarded.

To initiate another object code file, an ALGOL program must declare an external procedure and a task variable. The program must also assign the title of the object code file to the NAME attribute of a task variable. The program can then initiate the object code file with a process initiation statement that specifies the declared external procedure and task variable that were previously prepared.

Three process initiation statements are available. The CALL statement initiates a dependent, synchronous process. The PROCESS statement initiates a dependent, asynchronous process. The RUN statement initiates an independent process.

You can implement coroutines in ALGOL using CALL and CONTINUE statements. The CALL statement creates an active coroutine and changes the initiating process into a continuable coroutine. Coroutines can pass control back and forth by using CONTINUE statements.