next up previous contents index
Next: Data Types Up: Using Common Blocks Previous: Common Block Names

Declaring Arrays

The bounds of an array can be declared in the COMMON statement itself, or in a separate type or DIMENSION statement, but only in one of them. Thus:

 
       COMMON /DEMO/ ARRAY(5000) 
       DOUBLE PRECISION ARRAY

is exactly equivalent to:

 
       COMMON /DEMO/ ARRAY 
       DOUBLE PRECISION ARRAY(5000)
or even:
 
       COMMON /DEMO/ ARRAY 
       DOUBLE PRECISION ARRAY 
       DIMENSION ARRAY(5000)
but the verbosity of the third form has little to recommend it.



Mario Storti
Wed Nov 4 19:32:56 ART 1998