libsim Versione 7.2.0
list_mix.F03
1
17module list_mix
19use kinds
20private
24type,public,extends(list) :: mixlist
25#ifdef DOXYGEN
26 integer::none ! doxigen workaround: if missed do not show procedure
27#endif
28 contains
29 procedure :: current => currentmix
30 procedure :: display => displaymix
31end type mixlist
32
33contains
34
36subroutine displaymix(this)
37class(mixList),intent(inout) :: this
38class(*), pointer :: curr
39logical :: found
40
41call this%rewind()
42do while(this%element())
43 curr => this%Currentpoli()
44 found=.false.
45 select type(curr)
46 type is (integer)
47 print *,curr
48 found=.true.
49 type is (real)
50 print *,curr
51 found=.true.
52 type is (doubleprecision)
53 print *,curr
54 found=.true.
55 type is (integer(kind=int_b))
56 print *,curr
57 found=.true.
58 type is (character(*))
59 print *,curr
60 found=.true.
61 end select
62
63 if (.not. found) then
64 print *, "not supported type for display"
65 end if
66
67 call this%next()
68end do
69call this%rewind()
70end subroutine displaymix
72
74function currentmix(this)
75class(mixlist),intent(inout) :: this
76class(*), pointer :: currentmix
77currentmix => this%currentpoli()
78end function currentmix
79
80
81end module list_mix
82
Definition of constants to be used for declaring variables of a desired type.
Definition: kinds.F90:245
abstract class to use lists in fortran 2003.
class to use lists in fortran 2003.
Definition: list_mix.F03:58
Abstract implementation of doubly-linked list.
Non type specific implementation of doubly-linked list.
Definition: list_mix.F03:65

Generated with Doxygen.