Debian Codegraph @

loki/tests/sources/trivial_fortran_files/module_with_subroutines.f90

raw symbols SCIP
1 module math_operations
2 implicit none
3
4 public :: add, subtract, multiply
5
6 contains
7
8 ! Subroutine to add two numbers
9 subroutine add(x, y, result)
10 real, intent(in) :: x, y
11 real, intent(out) :: result
12 result = x + y
13 end subroutine add
14
15 ! Subroutine to subtract two numbers
16 subroutine subtract(x, y, result)
17 real, intent(in) :: x, y
18 real, intent(out) :: result
19 result = x - y
20 end subroutine subtract
21
22 ! Subroutine to multiply two numbers
23 subroutine multiply(x, y, result)
24 real, intent(in) :: x, y
25 real, intent(out) :: result
26 result = x * y
27 end subroutine multiply
28
29 end module math_operations