Each block plays the same role in the allocation and freeing of storage and in delimiting the scope of names. How activation occurs is discussed in Procedures and Begin-blocks. Packages are neither activated nor terminated.
During block activation, the following are performed:
Initial values and extents for automatic variables must not depend on the values or extents of other automatic variables declared in the same block. For example, the following initialization can produce incorrect results for J and K:
dcl I init(10),J init(K),K init(I);
Declarations of data items must not be mutually interdependent. For example, the following declarations are invalid:
dcl A(B(1)), B(A(1)); dcl D(E(1)), E(F(1)), F(D(1));
Errors can occur during block activation, and the ERROR condition (or other conditions) can be raised. If so, the environment of the block might be incomplete. In particular, some automatic variables might not have been allocated. Statements referencing automatic variables executed after the ERROR condition has been raised may reference unallocated storage. The results of referring to unallocated storage are undefined.