Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(llist), | intent(inout) | :: | lst |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(llist_node), | public, | pointer | :: | next | |||
type(llist_node), | public, | pointer | :: | this |
subroutine clear(lst)
type(llist), intent(inout) :: lst
type(llist_node), pointer :: this, next
this => lst%begin
do
if (.not. associated(this)) exit
next => this%next
deallocate(this)
this => next
end do
nullify(lst%end)
nullify(lst%begin)
end subroutine clear