libsim  Versione 7.1.9

◆ prepend()

subroutine list_abstract::prepend ( class(list), intent(inout)  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  !verify if it's last
185  if (associated(nextlink))then
186  call nextlink%setprevLink(newlink)
187  else
188  this%lastLink => newlink
189  end if
190  this%index=this%index+1
191 end if
192 
193 this%currLink => newlink

Generated with Doxygen.