codekingpro/portable-devtools
114k
1module mathops
2 implicit none
3contains
4 function add(a, b) result(c)
5 integer, intent(in) :: a, b
6 integer :: c
7 c = a + b
8 end function add
9end module mathops
10
11module useops
12 use mathops, only: add
13 implicit none
14contains
15 function sum_and_double(a, b) result(d)
16 integer, intent(in) :: a, b
17 integer :: d
18 d = 2 * add(a, b)
19 end function sum_and_double
20end module useops
21 