call set_blockbc(rank,bl_xmin,bl_xmax,bl_ymin,bl_ymax)
print*,rank,bl_xmin,bl_xmax,bl_ymin,bl_ymax
allocate(e(bl_xmin-1:bl_xmax+1,bl_ymin-1:bl_ymax+1),STAT=status0)
type(efield),dimension(:,:),intent(inout)::e
xl = lbound(e, dim=1)
xu = ubound(e, dim=1)
yl = lbound(e, dim=2)
yu = ubound(e, dim=2)
print*,xl,xu,lbound(e,dim=2),ubound(e,dim=2)
real :: a(0:3)
call sub(a)
subroutine sub(x)
real :: x(:) !//此处的 x 为 x(1:4)
end subroutine sub
fcode 发表于 2024-6-14 08:58
假定形状的参数,只传递大小,不传递上下限。
[mw_shl_code=fortran,true]real :: a(0:3)
call sub(a)
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |