[Fortran] 纯文本查看 复制代码 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 如看不懂,请回复 |