program www_fcode_cn
real , allocatable :: a(:)
call sub(a)
write(*,*) a
contains
subroutine sub(x)
real , allocatable ::x(:)
allocate(x(3))
x = 111.0
end subroutine sub
end program www_fcode_cn
vvt 发表于 2015-5-8 15:42
1. 对于可分配数组,如果已经分配,则可以当做普通数组变量传递。(虚参无需声明为allocatable)
2. 如果尚 ...
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |