FORTRAN 77 Language Reference

Examples

Example 1:


       DIMENSION V(100) 
       COMMON V, M 
       COMMON /LIMITS/I, J 
       ... 

Unlabeled common and labeled common:

In the above example, V and M are in the unlabeled common block; I and J are defined in the named common block, LIMITS.

Example 2: You cannot associate storage of two different common blocks in the same program unit:


       COMMON /X/ A 
       COMMON /Y/ B 
       EQUIVALENCE ( A, B)			        Not allowed

Example 3: An EQUIVALENCE statement can extend a common block on the right-hand side:


       DIMENSION A(5) 
       COMMON /X/ B 
       EQUIVALENCE ( B, A) 

Example 4: An EQUIVALENCE statement must not cause a common block to be extended on the left-hand side:


       COMMON /X/ A 
       REAL B(2) 
       EQUIVALENCE ( A, B(2))			   Not allowed