libsim Versione 7.2.4

◆ constructor()

type(link) function, pointer constructor ( character (len=*) value)
private

Constructor.

Parametri
valuevalue for list

Definizione alla linea 105 del file list_linkchar.F03.

106
112module list_linkchar
113 parameter(listcharmaxlen=10)
114
115 private
116 public :: link, listcharmaxlen
118 type link
119 private
120 character(len=listcharmaxlen) :: value = ""
121 type(link), pointer :: next => null()
122 type(link), pointer :: prev => null()
123 contains
124 procedure :: getValue
125 procedure :: nextLink
126 procedure :: prevLink
127 procedure :: setNextLink
128 procedure :: setPrevLink
129 end type link
130
132 interface link
133 procedure constructor
134 end interface
135
136contains
137
138function nextlink(this)
139class(link) :: this
140class(link), pointer :: nextLink
141nextlink => this%next
142end function nextlink
143
144function prevlink(this)
145class(link) :: this
146class(link), pointer :: prevLink
147prevlink => this%prev
148end function prevlink
149
150subroutine setnextlink(this,next)
151class(link) :: this
152type(link), pointer :: next
153this%next => next
154end subroutine setnextlink
155
156subroutine setprevlink(this,prev)
157class(link) :: this
158type(link), pointer :: prev
159this%prev => prev
160end subroutine setprevlink
161
162function getvalue(this)
163class(link) :: this
164character(len=listcharmaxlen) :: getValue
165getvalue = this%value
166end function getvalue
167
169function constructor(value)
170type(link),pointer :: constructor
171character (len=*) :: value
172
173allocate(constructor)
174constructor%prev => null()
175constructor%next => null()
176constructor%value=value
177
178end function constructor
179
180end module list_linkchar
class to manage links for lists in fortran 2003.

Generated with Doxygen.