libsim Versione 7.1.11

◆ currentreal()

real function currentreal ( class(reallist this)
private

get real pointed by iterator

Definizione alla linea 101 del file list_real.F03.

102
118module list_real
119 use list_abstract
120 private
121 public :: reallist
125 type, extends(list) :: reallist
126#ifdef DOXYGEN
127 integer::none ! doxigen workaround: if missed do not show procedure
128#endif
129 contains
130! procedure :: addReal !< add real in list
131 procedure :: current => currentreal
132 procedure :: display => displayreal
133! generic :: add => addReal
134 end type reallist
135
136contains
137
139subroutine displayreal(this)
140class(realList),intent(inout) :: this
141
142call this%rewind()
143do while(this%element())
144 print *,"index:",this%currentindex()," value:", this%current()
145 call this%next()
146end do
147end subroutine displayreal
148
149!!$ subroutine addReal(this, value)
150!!$ class(realList) :: this
151!!$ real value
152!!$ class(*), allocatable :: v
153!!$
154!!$ allocate(v,source=value)
155!!$ call this%addvalue(v)
156!!$
157!!$ end subroutine addReal
158
159
161real function currentreal(this)
162class(realList) :: this
163class(*), pointer :: v
164
165v => this%currentpoli()
166select type(v)
167type is (real)
168 currentreal = v
169end select
170end function currentreal
171
172end module list_real
abstract class to use lists in fortran 2003.
class to use lists in fortran 2003.
Definition: list_real.F03:58
Abstract implementation of doubly-linked list.
Real specific implementation of doubly-linked list.
Definition: list_real.F03:65

Generated with Doxygen.