各位大神,请问我有求解线性方程组的计算MAXA数组的子程序,也有数组,我读入了数组a(7,7),想计算MAXA数组,下面的程序调用这个FMAXA的时候报错了,
(1)warning FOR4227: argument LMT (number 3) in reference to procedure FMAXA from procedure MAIN22 incorrect: is not an array(2) warning FOR4227: argument MAXA (number 4) in reference to procedure FMAXA from procedure MAIN22 incorrect: is not an array
请问大家,应该怎么调试?
[Fortran] 纯文本查看 复制代码 program main22
dimension a(7,7)
open (1,file='E:\1.txt')
do 10 i=1,7
read(1,*)(a(i,j),j=1,7)
10 continue
write(*,*)((a(i,j),j=1,7),i=1,7)
call FMAXA(NN1, NE, LMT, MAXA, NWK, NPF, NDF)
END
SUBROUTINE FMAXA(NN1, NE, LMT, MAXA, NWK, NPF, NDF)
!This program forms the MDE address matrix MAXA of [K]
IMPLICIT REAL*8(A-H,O-Z)
IMPLICIT INTEGER*4(I-N)
DIMENSION MAXA(NPF), LMT(NDF,NE)
MAXA=0; NWK=0
MAXA(1)=1
DO I=2, NN1
IP=I-1
IG=IP
DO IE=1, NE
DO J=1, NDF
IF(LMT(J,IE).EQ.IP)THEN
DO K=1, NDF
IF(LMT(K,IE).GT.0.AND.LMT(K,IE).LE.IG) IG=LMT(K,IE)
ENDDO
END IF
ENDDO
ENDDO
MAXA(I)=MAXA(I-1)+IP-IG+1
ENDDO
NWK=MAXA(NN1)-1
RETURN
write(*,*)MAXA(I)
END
|