Defined operators and underscore
- From: rusi_pathan <tabrezali@xxxxxxxxx>
- Date: Tue, 19 Aug 2008 20:06:40 -0700 (PDT)
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
.
- Follow-Ups:
- Re: Defined operators and underscore
- From: Richard Maine
- Re: Defined operators and underscore
- Prev by Date: Re: J3 Responses to Public Comments
- Next by Date: Re: ordering integer array
- Previous by thread: zipcode selection sort in MR&C
- Next by thread: Re: Defined operators and underscore
- Index(es):
Relevant Pages
|
|