Hi, I code fortran in AIX with xlf90 compiler, find a error,
the source code is as follows:
MODULE modaa
CONTAINS
!----------------------------
SUBROUTINE SUBAA
integer,intent(in) :: n
integer,parameter :: m=10
real,dimension(1:m,1:n) :: ary
call subcc(ary,5,n)
print *, ary(3,1:n)
END SUBROUTINE SUBAA
!------------------------------
SUBROUTINE SUBCC(ary,m,n)
integer,intent(in) :: m,n
real,dimension(1:m,1:n),INTENT(OUT) :: ary
integer :: i,j
do i= 1, m
do j = 1, n
ary(i,j) = 5
end do
end do
END SUBROUTINE SUBCC
!---------------------------------
END MODULE modaa
!=======================================
PROGRAM MAIN
USE modaa
call subaa(10)
END PROGRAM MAIN
I run this program, it will lead some error, output print number is error,such as:
5.00000000000000000 5.00000000000000000 5.00000000000000000 5.00000000000000000 5.00000000000000000 0.381534781347033038E-269 0.128822975391891636E-230 0.000000000000000000E+00 0.988131291682493088E-323 -0.310503970101894453E+232
I hope experts can help me? thanks
the source code is as follows:
MODULE modaa
CONTAINS
!----------------------------
SUBROUTINE SUBAA
integer,intent(in) :: n
integer,parameter :: m=10
real,dimension(1:m,1:n) :: ary
call subcc(ary,5,n)
print *, ary(3,1:n)
END SUBROUTINE SUBAA
!------------------------------
SUBROUTINE SUBCC(ary,m,n)
integer,intent(in) :: m,n
real,dimension(1:m,1:n),INTENT(OUT) :: ary
integer :: i,j
do i= 1, m
do j = 1, n
ary(i,j) = 5
end do
end do
END SUBROUTINE SUBCC
!---------------------------------
END MODULE modaa
!=======================================
PROGRAM MAIN
USE modaa
call subaa(10)
END PROGRAM MAIN
I run this program, it will lead some error, output print number is error,such as:
5.00000000000000000 5.00000000000000000 5.00000000000000000 5.00000000000000000 5.00000000000000000 0.381534781347033038E-269 0.128822975391891636E-230 0.000000000000000000E+00 0.988131291682493088E-323 -0.310503970101894453E+232
I hope experts can help me? thanks