libsim  Versione6.3.0

◆ append()

subroutine list_abstract::append ( class(list this,
class(*)  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. associated(this%currLink)) 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()
Method for inserting elements of the array at a desired position.
Index method.

Generated with Doxygen.