mod function in fortran code example
Example 1: fortran exp function
program test_exp
real :: x = 1.0
x = exp(x)
end program test_exp
Example 2: fortran module
module name
implicit none
private
some declarations
public :: names of public stuff
contains
some subroutines/functions
end module name