PROGRAM Three_Array_Calls REAL, DIMENSION(1:10) :: F REAL, DIMENSION(1:5,51:100) :: G REAL, DIMENSION(-10:10,-10:10,-10:10) :: H CALL Three_Arrays(F, G, H) ENDPROGRAM Three_Array_Calls ! -- flexible SUBROUTINE --- can be used with any rank 1, 2 and 3 arrays : SUBROUTINE Three_Arrays(A, B, C) REAL, INTENT(INOUT) :: A(:) REAL, INTENT(INOUT) :: B(:,:) REAL, INTENT(INOUT) :: C(:,:,:) !...do something with the arrays A, B and C... M = SIZE(B,1) N = SIZE(B,2) DO I = 1, M DO J = 1, N !...do more with the arrays A, B and C... END DO END DO END SUBROUTINE |
...previous | up (conts) | next... |