! Module module my_mod ! The custom operator being defined is 'plus' (Note that for some ! odd reason underscores are not allowed in a defined operator ie, ! using 'my_plus' below wont work) interface operator(.plus.) module procedure my_add end interface contains function my_add(a,b) implicit none real, intent(in) :: a,b real :: my_add my_add = a + b end function my_add end module my_mod ! Main Program program main use my_mod implicit none real :: x,y,z x = 1.0 y = 2.0 z = my_add(x,y) ! --- Normal call to a function print*, z z = 0.0 z = x .plus. y ! --- Overloaded operator print*, z end program main