Re: avoiding writing an interface blocks
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 19 Dec 2006 23:50:25 +0000 (UTC)
Richard E Maine <nospam@xxxxxxxxxxxxx> wrote:
My interpretation is that he wanted to declare the return type,
as required, without declaring the arguments, assuming that the
arguments wouldn't require an interface on their own.
Yes. This is what I meant.
But you need more than just the type. You also need the shape
information in this case, that being what trigerred the requirement for
an explicit interface here in the first place. Perhaps you are just
thinking that is part of declaring the type. If so, that is distinctly
wrong. It is important in Fortran that shape is distinct from type;
there are many implications of that, which I won't go into here (it gets
off topic, would take a lot of time, and I don't even recall them all
off the top of my head).
How about attributes? (I think in C type includes shape, but attributes
may overall be a better word to describe it.)
If you declare just the type and nothing else, then that's exactly what
an implicit interface is - not an explicit one. No, you can't ignore the
requirement and use an implicit interface when the standard requires an
explicit one.
What I meant was to declare all the properties needed for the return
value, without declaring those for the arguments. Yes, sorry, type
is just one of those properties.
I also agree that the bug finding properties of declaring the
argument properties are probably worth the extra work to get it right.
Then again, maybe a subroutine with an additional assumed size
array argument would satisfy the OP.
-- glen
.
- Follow-Ups:
- Re: avoiding writing an interface blocks
- From: Kamaraju Kusumanchi
- Re: avoiding writing an interface blocks
- References:
- avoiding writing an interface blocks
- From: Kamaraju Kusumanchi
- Re: avoiding writing an interface blocks
- From: Richard E Maine
- Re: avoiding writing an interface blocks
- From: glen herrmannsfeldt
- Re: avoiding writing an interface blocks
- From: Kamaraju Kusumanchi
- Re: avoiding writing an interface blocks
- From: Richard E Maine
- avoiding writing an interface blocks
- Prev by Date: Re: f2003 - abstract types and abstract interfaces
- Next by Date: Re: avoiding writing an interface blocks
- Previous by thread: Re: avoiding writing an interface blocks
- Next by thread: Re: avoiding writing an interface blocks
- Index(es):
Relevant Pages
|