summaryrefslogtreecommitdiff
path: root/.venv/lib/python3.12/site-packages/numpy/f2py/tests/src/modules/use_modules.f90
blob: aa40c86ca39d1dbcfacca9dcb2addbc6ede73140 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module mathops
  implicit none
contains
  function add(a, b) result(c)
    integer, intent(in) :: a, b
    integer :: c
    c = a + b
  end function add
end module mathops

module useops
  use mathops, only: add
  implicit none
contains
  function sum_and_double(a, b) result(d)
    integer, intent(in) :: a, b
    integer :: d
    d = 2 * add(a, b)
  end function sum_and_double
end module useops