1module test_interface
2  type atype
3  end type atype
4  ! operator overload
5  interface operator(+)
6    ! subprogram prototype
7    type(atype) function add(a, b)
8      import atype
9      type(atype), intent(in) :: a, b
10    end function add
11  end interface operator(+)
12  ! wrap subprogram prototypes
13  interface ! anonymous interface
14    subroutine suba()
15    end subroutine suba
16    subroutine subb()
17    end subroutine subb
18  end interface
19  ! define generic subprograms
20  interface get
21    ! subprogram name list
22    module procedure get_1d
23    module procedure get_2d
24  end interface get
25contains
26  ! definition of subprograms
27  subroutine get_1d(a)
28    real a(:)
29  end subroutine get_1d
30  subroutine get_2d(a)
31    real a(:, :)
32  end subroutine get_2d
33end module test_interface
34