! Module module my_mod implicit none private ! Defaults everything to private public :: operator(.plus.) ! The main code can call 'my_add' indirectly ! using '.plus.' but NOT directly 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) ! Will NOT work z = x .plus. y ! Will work print*, z end program main