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
|
|