program main
implicit none
integer i,j
type tableType
integer :: i
type(tableType), pointer :: next
END TYPE
type(tableType), pointer :: table,tableHd
do j=1,100
allocate(tableHd) ! 储存链表
table=>tableHd ! 过程链表
nullify(table%next)
do i=1,10000
table%i=i
allocate(table%next)
table=>table%next
nullify(table%next)
enddo
deallocate(tableHd)
enddo
i=0 ! pause
end program main
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |