4.9 Deferred Shape Objects

Fortran array inquiry references, assumed shape objects, deferred shape objects, and Fortran pointers are converted into descriptors. One component of these descriptors indirectly locates the contents of such an array.

The arrangement of the array elements is described by the other components of the descriptor. When an assumed shape array or an array found with a pointer is subscripted, the subscript calculation is rewritten as a function of the descriptor. This transform is needed to treat the nondefault strides that arise in examples such as the following:

subroutine a( b )

integer, dimension(:.:) :: b

 ...

end subroutine a


 ...


integer d(10,20)

call a( d(:10:2,20:10:-1)

 ...

For array pointer objects:

integer, pointer :: b(:,:)

integer d(20,30)

 ...


b => d(20:1:-1,30:1:-1)

 ...

In each case, an assignment to b must affect elements of d that are not found in traditional Fortran 77 element order.


Previous Page | Next Page | Contents | Index |
Command-Line Qualifiers

Copyright © Digital Equipment Corporation. 1999. All Rights Reserved.