Re: overloaded cant be distinguished by return values?
- From: gary.l.scott@xxxxxxxx
- Date: 30 May 2007 07:37:01 -0700
On May 30, 9:17 am, Richard Edgar <r...@xxxxxxxxxxxxxxxxx> wrote:
Michael Metcalf wrote:
"Berthold "Höllmann"" <berth...@xxxxxxxxxxxxx> wrote in message
news:seodk2la4b.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I am trying to distinguisch overloaded functions by their result value
but get an error message from ifort 9.1:
The message is correct. Overloaded procedures are disambiguated according to
their arguments ("Fortran 95/2003 Explained", Section 5.18).
Regards,
Being more general (please correct me if I'm wrong...), this is an
example of the rule in Fortran that the RHS of any expression is
evaluated before the LHS is considered. This is why
REAL :: a
a = 1/2
results in a being set equal to zero.
I don't quite understand this interpretation. There doesn't appear to
me that there is anything on the left hand side to be "evaluated". It
simply says "set variable (a) equal to something" (that must be
evaluated). I wouldn't necessarily expect it to look at the left hand
side to determine whether the variable is real or integer before
deciding how to evaluate the RHS. It would appear that Fortran does
what I would consider to be the "natural thing".
Richard
.
- References:
- overloaded cant be distinguished by return values?
- From: Berthold Höllmann
- Re: overloaded cant be distinguished by return values?
- From: Michael Metcalf
- Re: overloaded cant be distinguished by return values?
- From: Richard Edgar
- overloaded cant be distinguished by return values?
- Prev by Date: Re: strange arguments passing problem (from vba to fortran dll)
- Next by Date: Re: F77 & WIN XP
- Previous by thread: Re: overloaded cant be distinguished by return values?
- Next by thread: Re: overloaded cant be distinguished by return values?
- Index(es):
Relevant Pages
|