MODFLOW 6  version 6.7.0.dev0
USGS Modular Hydrologic Model
Iterator.f90
Go to the documentation of this file.
2  use kindmodule, only: lgp
3  implicit none
4  private
5 
6  public :: iteratortype
7 
8  type, abstract :: iteratortype
9  contains
10  procedure(has_next_if), deferred :: has_next
11  procedure(next_if), deferred :: next
12  procedure(value_if), deferred :: value
13 
14  end type iteratortype
15 
16  abstract interface
17 
18  function has_next_if(this) result(res)
19  import iteratortype
20  import lgp
21  class(iteratortype) :: this
22  logical(LGP) :: res
23  end function
24 
25  subroutine next_if(this)
26  import iteratortype
27  class(iteratortype) :: this
28  end subroutine
29 
30  function value_if(this) result(res)
31  import iteratortype
32  class(iteratortype) :: this
33  class(*), pointer :: res
34  end function
35 
36  end interface
37 
38 end module iteratormodule
This module defines variable data types.
Definition: kind.f90:8