KKK, A(7), A(4), NSUMTo fill a complete array in the order in which it is arranged in memory (see section 7) it is only necessary to give the array name e.g.:-
DIMENSION B123Z(24,7) . . . READ(IDEV,90000) B123Z
It is also possible to fill part, or all of an array using an IMPLIED DO LIST construct. It behaves exactly like a DO loop (see section 8). Shown below are some legal implied do lists for the array B123Z described above :-
(B123Z(I,5),I=5,9,1) (B123Z(3,I),I=7,1,-1) ((B123Z(I1,I2),I1=1,24),I2=1,7)
Note that, just as with normal DO loops, they can run forwards or backwards and can be nested. If the loop increment is missing then +1 is assumed. The last example above would fill out the array exactly as arranged in memory (and so could have been written more simply as just B123Z). Complete arrays, implied do list constructions, variables and array elements can be combined in any arrangement to form an I/O list. A commonly used I/O list that processes a variable length record using an array (say A) is:-
N,(A(I),I=1,N)So the records start with a counter containing the number of items following. Of course the array A must be at least N elements long!