The following ALGOL structures are considered blocks:
-
Any complete ALGOL program. A complete ALGOL program can be initiated but cannot be entered.
-
Any typed procedure; that is, any procedure designed to be invoked as a function that returns a value. (For example, Boolean procedures or real procedures.) Typed procedures can be entered and initiated. However, if a typed procedure is initiated, the returned value is discarded.
-
A simple block, which is any group of declarations and statements that appears between the words BEGIN and END and is not preceded by a procedure heading. (An exception is the outer block of the program, which is not considered a simple block.) Such a block cannot be entered or initiated. The block is executed when control passes either from the previous statement in the program or from a GO TO statement elsewhere in the program. (Note that a BEGIN...END statement is not treated as a block if it does not include any declarations. In this case, it is simply a compound statement.)
When you initiate one of these ALGOL structures, the system creates a process stack. When you enter one of these ALGOL structures, the system creates an activation record. When a BEGIN...END block that includes declarations is executed, the system also creates an activation record.
An ALGOL program that initiates an asynchronous process should usually include a wait statement to prevent the critical block from being exited while the offspring is in use. An example of this wait statement is given in Understanding Interprocess Relationships.
ALGOL includes an abundance of flow-of-control statements, such as CASE, DO, FOR, IF and WHILE. By using these statements together with task attribute interrogations, an ALGOL program can provide conditional control over tasks.

