libsim  Versione7.2.1

◆ append()

subroutine list_abstract::append ( class(list), intent(inout)  this,
class(*), intent(in)  value 
)
private

add class(*) to end of list

Definizione alla linea 164 del file list_abstract.F03.

164 !if (present(index)) then
165  insert = this%seek(index)
166  if (.not. insert) return
167 !else
168 ! insert=.true.
169 !end if
170 
171 if (.not. this%element()) then
172  !insert the first one
173  this%firstLink => newlink
174  this%lastLink => newlink
175  this%index=1
176 else
177  !set prev and next in new link
178  call newlink%setPrevLink(this%currlink)
179  call newlink%setNextLink(this%currlink%nextlink())
180 
181  !break the chain and insert
182  nextlink=>this%currlink%nextlink()
Index method.

Generated with Doxygen.