主题:Fortran编译错误!
我把主程序省略了,子程序也只列出编译出错部分,主要程序如下:
subroutine Inverse(A,B,n)
use imsl
implicit none
integer :: n,i,j
complex(kind=8) :: A(n,n),B(n,n)
integer, parameter :: m=12
complex(kind=8) :: E(m,m),E1(m,1)
E=0.
forall(i=1:m,j=1:m,i==j) E(i,j)=(1.,0.)
E1(:,1)= E(:,1)
end
编译时出现的错误如下:
Error1: The attributes of this name conflict with those made accessible by a USE statement. [E1]complex(kind=8) :: E(m,m),E1(m,1)
Error2: The syntax of this substring is invalid. [E1]
E1(:,1)= E(:,1)
将use IMSL 注释掉后( ! use imsl),编译就通过了,我想知道为什么这两个语句和IMSl冲突呢? 谢谢!