libsim Versione 7.2.1

◆ displayreal()

subroutine displayreal ( class(reallist), intent(inout)  this)

Print the real list.

Definizione alla linea 79 del file list_real.F03.

80
96module list_real
98 private
99 public :: reallist
103 type, extends(list) :: reallist
104#ifdef DOXYGEN
105 integer::none ! doxigen workaround: if missed do not show procedure
106#endif
107 contains
108! procedure :: addReal !< add real in list
109 procedure :: current => currentreal
110 procedure :: display => displayreal
111! generic :: add => addReal
112 end type reallist
113
114contains
115
117subroutine displayreal(this)
118class(realList),intent(inout) :: this
119
120call this%rewind()
121do while(this%element())
122 print *,"index:",this%currentindex()," value:", this%current()
123 call this%next()
124end do
125end subroutine displayreal
126
127!!$ subroutine addReal(this, value)
128!!$ class(realList) :: this
129!!$ real value
130!!$ class(*), allocatable :: v
131!!$
132!!$ allocate(v,source=value)
133!!$ call this%addvalue(v)
134!!$
135!!$ end subroutine addReal
136
137
139real function currentreal(this)
140class(realList) :: this
141class(*), pointer :: v
142
143v => this%currentpoli()
144select type(v)
145type is (real)
146 currentreal = v
147end select
148end function currentreal
149
150end 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.