File: submodule.f90

package info (click to toggle)
fortran-language-server 3.2.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,268 kB
  • sloc: python: 9,688; f90: 1,195; fortran: 30; makefile: 28; ansic: 20
file content (24 lines) | stat: -rw-r--r-- 655 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
module parent_mod
  implicit none
  type :: typ
    real(kind=8) :: value
  contains
    procedure :: method1 => submod_method1
  end type typ
  interface
    module subroutine submod_method1(this)
      class(typ), intent(inout) :: this
    end subroutine submod_method1
    module subroutine submod_method2(this, value)
      class(typ), intent(inout) :: this
      real, intent(in) :: value
    end subroutine submod_method2
  end interface
end module parent_mod
submodule(parent_mod) submod
contains
  module subroutine submod_method1(this)
    class(typ), intent(inout) :: this
    this%value = 0
  end subroutine submod_method1
end submodule submod