A dummy argument that is an explicit-shape array must conform in size and shape to the associated actual argument; no bound information is passed to the procedure. Consider the following examples,
PROGRAM Main
IMPLICIT NONE
INTEGER, DIMENSION(8,8) :: A1
INTEGER, DIMENSION(64) :: A2
INTEGER, DIMENSION(16,32) :: A3
...
CALL subby(A1) ! OK
CALL subby(A2) ! non conforming
CALL subby(A3(::2,::4)) ! OK
CALL subby(RESHAPE(A2,(/8,8/)) ! OK
...
CONTAINS
SUBROUTINE subby(explicit_shape)
IMPLICIT NONE
INTEGER, DIMENSION(8,8) :: explicit_shape
...
END SUBROUTINE subby
END PROGRAM Main
The bottom line is subby can ``accept any argument as long as it is
an
default INTEGER array''! This is clearly a very
inflexible approach which generally should not generally be used.
Return to corresponding overview page