Re: PROCEDURE with implicit interface as actual argument
- From: Tobias Burnus <burnus@xxxxxxxx>
- Date: Sun, 30 Nov 2008 23:40:37 +0100
Richard Maine wrote:
I think the question is really boils down to understand what the
following means:
"12.4.1.3 Actual arguments associated with dummy procedure entities"
[...]
"If the interface of the dummy argument is explicit,...
Well, that applies to your version, but not directly to the original,
which did not have an explicit interface. I agree the questions are
similar, but at least the original one can't all boil down to the
interpretation of something that starts with a conditional that is false
for that case. Admittedly, the answers might come out the same by
parallel reasoning.
Somehow I missed that. For implicit interfaces, one has:
"If the interface of the dummy argument is implicit and either the name
of the dummy argument is explicitly typed or it is referenced as a
function, the dummy argument shall not be referenced as a subroutine and
the actual argument shall be a function, function procedure pointer, or
dummy procedure."
For a simple EXTERNAL or PROCEDURE() I think that quite explicitly
allows it; for "PROCEDURE(), POINTER" I would argue that it is valid as
well, though arguably less obvious. (If the target is a function - does
this make the pointer automatically a function procedure pointer? I
think that's intended but I am not sure that's written as such.)
If I replace the explicit interface in my example by "real, external ::
a" I get the same result: NAG f95 and gfortran reject the program, g95,
ifort and openf95 accept the program.
Richard, do you agree with my conclusion for _my_ unmodified program and
for my program modified as above (implicit interface for a dummy, but
typed as real and used as function) is valid, which means that NAG f95,
Lahey and gfortran have too strict checking? For the original example
you were leaning towards it being ok - are you now more certain about it
or less or equally?
Thanks for your always helpful judgments!
Tobias
.
- Follow-Ups:
- Re: PROCEDURE with implicit interface as actual argument
- From: Richard Maine
- Re: PROCEDURE with implicit interface as actual argument
- Prev by Date: Re: RAM access limits under 64bit
- Next by Date: Re: PROCEDURE with implicit interface as actual argument
- Previous by thread: Re: RAM access limits under 64bit
- Next by thread: Re: PROCEDURE with implicit interface as actual argument
- Index(es):
Relevant Pages
|