libsim Versione 7.2.0

◆ toarray_charl()

character(len=listcharmaxlen) function, dimension(:), allocatable, public toarray_charl ( type(characterlist this)

/brief Return an array of char from

Restituisce
array
Parametri
thislist of char

Definizione alla linea 113 del file list_character.F03.

114
130module list_character
132 use list_linkchar
133 private
134 public :: characterlist, toarray_charl
138 type, extends(list) :: characterlist
139#ifdef DOXYGEN
140 integer::none ! doxigen workaround: if missed do not show procedure
141#endif
142 contains
143! procedure :: addCharacter !< add character in list
144 procedure :: current => currentcharacter
145 procedure :: display => displaycharacter
146! generic :: add => addCharacter
147 end type characterlist
148
149contains
150
152subroutine displaycharacter(this)
153class(characterList) :: this
154
155call this%rewind()
156do while(this%element())
157
158 print *,"index:",this%currentindex()," value:", trim(this%current())
159 call this%next()
160end do
161end subroutine displaycharacter
162
163!!$ subroutine addCharacter(this, value)
164!!$ class(characterList) :: this
165!!$ character value
166!!$ class(*), allocatable :: v
167!!$
168!!$ allocate(v,source=value)
169!!$ call this%addvalue(v)
170!!$
171!!$ end subroutine addCharacter
172
173
175function currentcharacter(this)
176character(len=listcharmaxlen) :: currentCharacter
177class(characterList) :: this
178
179currentcharacter = this%currentpoli()
180
181end function currentcharacter
182
183
185function toarray_charl(this)
186character(len=listcharmaxlen),allocatable :: toarray_charl(:)
187type(characterlist) :: this
188
189integer :: i
190
191allocate (toarray_charl(this%countelements()))
192
193call this%rewind()
194i=0
195do while(this%element())
196 i=i+1
197 toarray_charl(i) =this%current()
198 call this%next()
199end do
200end function toarray_charl
201
202
203
204end module list_character
like abstract class to use character lists in fortran 2003 (gnu gcc 4.8 do not work with character(le...
class to use character lists in fortran 2003 WARNING !!!! CHAR LEN IS FIXED TO listcharmaxlen.
class to manage links for lists in fortran 2003.
Abstract implementation of doubly-linked list.
Character specific implementation of doubly-linked list.

Generated with Doxygen.