57 integer,
dimension(:),
allocatable :: list_data
62 integer,
dimension(:),
pointer :: data => null()
63 type(list_t),
pointer :: next => null()
70 type(list_t),
pointer :: self
71 integer,
dimension(:),
intent(in),
optional ::
data
76 if (present(
data))
then
77 allocate(self%data(
size(
data)))
86 type(list_t),
pointer :: self
87 type(list_t),
pointer :: current
88 type(list_t),
pointer :: next
91 do while (
associated(current))
93 if (
associated(current%data))
then
94 deallocate(current%data)
105 type(list_t),
pointer :: self
106 type(list_t),
pointer :: next
112 type(list_t),
pointer :: self
113 integer,
dimension(:),
intent(in),
optional ::
data
114 type(list_t),
pointer :: next
118 if (present(
data))
then
119 allocate(next%data(
size(
data)))
125 next%next => self%next
131 type(list_t),
pointer :: self
132 integer,
dimension(:),
intent(in) ::
data
134 if (
associated(self%data))
then
135 deallocate(self%data)
143 type(list_t),
pointer :: self
144 integer,
dimension(:),
pointer ::
data
149 TYPE(list_t),
POINTER :: self
151 TYPE(list_t),
POINTER :: current,next
153 IF (
ASSOCIATED(self) )
then
156 DO WHILE (
ASSOCIATED(current%next) )
157 current => current%next
type(list_node_t) function, pointer, public list_next(self)
subroutine, public list_insert(self, data)
subroutine, public list_put(self, data)
subroutine, public list_init(self, data)
subroutine, public list_free(self)
integer function, dimension(:), pointer, public list_get(self)