Other arrays can depend on dummy arguments, these are called automatic arrays and:
PROGRAM Main IMPLICIT NONE INTEGER :: IX, IY ..... CALL une_bus_riot(IX,2,3) CALL une_bus_riot(IY,7,2) CONTAINS SUBROUTINE une_bus_riot(A,M,N) INTEGER, INTENT(IN) :: M, N INTEGER, INTENT(INOUT) :: A(:,:) REAL :: A1(M,N) ! auto REAL :: A2(SIZE(A,1),SIZE(A,2)) ! auto ... END SUBROUTINE END PROGRAM
The SIZE intrinsic or dummy arguments can be used to declare automatic arrays. A1 and A2 may have different sizes for different calls.
For more information, click here