   SUBROUTINE FuncWithMatrixParam( A )
     IMPLICIT NONE

     REAL, DIMENSION(:,:) :: A 

     integer i, j

     print *, "Number of rows = ", SIZE(A, 1)
     print *, "Number of columns = ", SIZE(A, 2) 
     print *

     DO i = 1, SIZE(A, 1)           !! # rows
       DO j = 1, SIZE(A, 2)         !! # columns
          print *, A(i,j)
       END DO
       print *
     END DO
     print *
   END

 ! ==============================

   PROGRAM Main

   REAL, DIMENSION(2, 3) :: A

   DATA A/ 1, 2, 3, 4, 5, 6/

   integer i, j

   INTERFACE
     SUBROUTINE FuncWithMatrixParam( A )
       REAL, DIMENSION(:,:) :: A
     END SUBROUTINE
   END INTERFACE

   CALL FuncWithMatrixParam( A )

   END

