Module ModA
Implicit None
Real , Allocatable :: ra(:) , rb(:)
contains
Subroutine Alloc_ModA( n )
Integer , Intent( IN ) :: n
allocate( ra(n) , rb(n) )
End Subroutine Alloc_ModA
Subroutine Dealloc_ModA
deallocate( ra , rb )
End Subroutine Dealloc_ModA
End Module ModA
Program www_fcode_cn
use ModA
Implicit None
call Alloc_ModA( 3 )
ra = 1.0
rb = 2.0
write(*,*) ra , rb
call Dealloc_ModA
End Program www_fcode_cn
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |