libsim Versione 7.2.6

◆ insert()

logical function insert ( class(list), intent(inout) this,
class(*) value,
integer index )
private

add class(*) to position in list

Definizione alla linea 197 del file list_abstract.F03.

198integer function currentindex(this)
199class(list),intent(in) :: this
200currentindex=this%index
201end function currentindex
202
203!> reset list iterator to start
204subroutine rewind(this)
205class(list),intent(inout) :: this
206this%currLink => this%firstLink
207if (.not. associated(this%firstLink)) then
208 this%index=imiss
209else
210 this%index=1
211end if
212end subroutine rewind
213
214!> reset list iterator to end
215subroutine forward(this)
216class(list),intent(inout) :: this
217this%currLink => this%lastLink
218if (.not. associated(this%lastLink)) then
219 ! index is unknow here
220 this%index=imiss
221end if
222
223end subroutine forward
224
225!> increment list iterator
226subroutine next(this)
227class(list),intent(inout) :: this
228
229if (this%element()) then
230 this%currLink => this%currLink%nextLink()
231 if (this%element())then
232 if(c_e(this%index))this%index=this%index+1
233 else
234 this%index=imiss
235 end if

Generated with Doxygen.