libsim  Versione 7.1.6

◆ prepend()

subroutine list_abstract::prepend ( class(list this,
class(*)  value 
)
private

add class(*) to beginning of list

Definizione alla linea 175 del file list_abstract.F03.

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()
183  call this%currLink%setNextLink(newlink)
184  call nextlink%setprevLink(newlink)
185  !verify if it's first or last
186  if (.not. this%element())then
187  this%firstLink => newlink
188  this%lastLink => newlink
189  end if
190  this%index=this%index+1
191 end if
192 
193 this%currLink => newlink

Generated with Doxygen.