libsim Versione 7.2.0
|
◆ toarray_charl()
/brief Return an array of char from
Definizione alla linea 113 del file list_character.F03. 114
133 private
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
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
like abstract class to use character lists in fortran 2003 (gnu gcc 4.8 do not work with character(le... Definition: list_abstractforchar.F03:48 class to use character lists in fortran 2003 WARNING !!!! CHAR LEN IS FIXED TO listcharmaxlen. Definition: list_character.F03:58 Abstract implementation of doubly-linked list. Definition: list_abstractforchar.F03:57 Character specific implementation of doubly-linked list. Definition: list_character.F03:66 |