! test2.f90
program main
use comm_data
implicit none
type(core_data) :: data
call allo_core_data( data, 2, 4)
data % coorn = 4.0
write(*,*) data % coorn
stop
end program main
! comm_data.f90
module comm_data
implicit none
save
type core_data
integer ndim
integer npoint
real, allocatable, dimension(:,:) :: coorn
end type core_data
contains
subroutine allo_core_data( data, ndim, npoint )
implicit none
type(core_data), intent(out) :: data
integer, intent(in) :: npoint
integer, intent(in) :: ndim
data % ndim = ndim
data % npoint = npoint
allocate( data % coorn( data % ndim, data % npoint ) )
data % coorn = 0.0
end subroutine allo_core_data
end module comm_data
174 Bytes, 下载次数: 0
547 Bytes, 下载次数: 0
好小爱新 发表于 2015-6-15 08:57
您用ifort配合gdb?确实没试过,不过如果是windows版本的话,用打过董兄(xunxun)的补丁的gdb就可以用print显 ...
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |