next up previous contents
Next: Array Syntax Up: Arrays Previous: Array Conformance

 

Array Element Ordering

Fortran 90 does not have any storage associationgif, this means that, unlike FORTRAN 77, the standard does not specify how arrays are to be organised in memory. The lack of implicit storage association makes it easier to write portable programs and allows compiler writers more freedom to implement local optimisations. For example, in distributed memory computers an array may be stored over 100 processors with each processor owning only a small section of the whole array -- the standard will allow this.

There are certain situations where an ordering is needed, for example, during input or output and in these circumstances Fortran 90 does define ordering which can be used in such contexts. It is defined in the same manner as the FORTRAN 77 storage association but it does not imply anything about how array elements are stored.

The array element ordering is again of column major form:

 C(1,1),C(2,1),..,C(5,1),C(1,2),C(2,2),..,C(5,3)

  figure7337
Figure 10: Visualisation Of Array Element Ordering

This ordering is used in array constructors, I/O statements, certain intrinsics (TRANSFER, RESHAPE, PACK, UNPACK and MERGE) and any other contexts where an ordering is needed.

Now try this question gif

Return to corresponding overview page gif


next up previous contents
Next: Array Syntax Up: Arrays Previous: Array Conformance

©University of Liverpool, 1997
Wed May 28 20:20:27 BST 1997
Not for commercial use.