Defined operators and underscore



What would be a good reason for not allowing underscores in defined
operators? I cannot seem to think of a situation where it can cause
problems or confusion.

For example using "my_plus" instead of "myplus" doesnt work for the
code below:

! --- Module
module my_mod
interface operator(.myplus.)
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 = 0.0
z = x .myplus. y
print*, z
end program main
.



Relevant Pages

  • Re: Procedures as arguments - set dummy arguments
    ... implicit none ... lpCurrentDirectory, lpStartupInfo, lpProcessInformation & ... end interface ... public GetLastError ...
    (comp.lang.fortran)
  • Re: Fortran templates
    ... end module mykinds ... implicit real ... end interface initr1_int ... Maybe that's due to an old version of ifort: allowing intrinsics ...
    (comp.lang.fortran)
  • RE: Who changed /proc/<pid>/ in 2.6.0-test5-bk9?
    ... kernel. ... A process has unity of interface. ... you cannot conjoin-clone and thread-clone repeatedly and variously from the ... If there is no reason to share, ...
    (Linux-Kernel)
  • Re: WinXP 64-bit Virtual DMA_ADAPTER
    ... Such interface abstracts from any internal implementation ... system that runs without Verifier. ... If MSFT wants a black box OS, ... reason why it should work differently under 64. ...
    (microsoft.public.development.device.drivers)
  • Re: mean function (intrinsic) in Fortran 95
    ... interface block to create a generic averagefunction that resolves the ... elemental subroutine x_int_assign ... end module mykinds ... implicit real ...
    (comp.lang.fortran)