fortran的allocate的用法
fortran的allocate的用法
这段代码怎么有点不对
function igl(lxyz,ig,l)
implicit none
integer,parameter::integ=4
integer igl,lxyz(3),ig(3),l,i
integer,allocatable::rex(*),rey(*),rez(*),ref(*)
allocate(rex(l))
allocate(rey(l))
allocate(rez(l))
allocate(ref(3*l))
do i=1,3*l
ref(i)=0 initialize it to zero
enddo
.
还有后续的代码,提示是带allocate的所有行都有问题,我大概知道function里面好像根本不用声明allocate,直接声明integer rex(l)就可以.是不是这样啊.