Re: Are procedure dummy arguments ignored in generic procedure resolution?
From: Richard E Maine (nospam_at_see.signature)
Date: 12/10/04
- Next message: Helge Avlesen: "SCons"
- Previous message: Gordon Sande: "Re: Who uses clapack?"
- In reply to: James Van Buskirk: "Re: Are procedure dummy arguments ignored in generic procedure resolution?"
- Next in thread: James Van Buskirk: "Re: Are procedure dummy arguments ignored in generic procedure resolution?"
- Reply: James Van Buskirk: "Re: Are procedure dummy arguments ignored in generic procedure resolution?"
- Reply: glen herrmannsfeldt: "Re: Are procedure dummy arguments ignored in generic procedure resolution?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 10 Dec 2004 09:48:02 -0800
"James Van Buskirk" <not_valid@comcast.net> writes:
> Given the fact that the standard never required dummy
> procedures, only actual argument procedures, to be identified as
> procedures via an interface block or an external statement, as
> well as the possibility of implicit typing, you can't tell a
> variable of the indicated implicit type from a function returning
> a value of that implicit type or a subroutine if the dummy argument
> has no declaration in the interface block.
Hmm. I'm not going to say that you are wrong because...
1. You usually aren't, even when I think you are. :-)
2. The area is subtle.
But I think you are.... well... lets' call it partly wrong.
Either that, or maybe there's a hole in the standard.
I agree that, strictly speaking, the standard has never required
dummy procedures to be identified as procedures via an interface
block (newfangled stuff anyway) or an external statement. And
I won't quibble about things like the external attribute, which
can be done in a type declaration statement.
But the standard does require such identification if you ever use
the dummy in a context where it isn't directly obvious from the
context. So you can get by without the explicit external if all
you ever do is, for example, call the dummy subroutine or reference
the dummy function in an expression.
The "interesting" case is when you do nothing at all with the dummy.
In that case.... hmm... I guess I agree that I can't find any
prohibition on having the dummy being a dummy procedure. Seems to
me like this could cause implementation problems, though, if procedures
required different argument-passing mechanisms than variables (as
sometimes they do). The only "traditional" example of this would be
a dummy procedure that was never used at all, but f90 interface bodies
do open the possibility that the dummy is used in the body of the
procedure, but not in the interface body describing the procedure.
But then "procedureness" (not the term used by the standard) is a
characteristic of a dummy argument. An interface body "specifies
all of the characteristics" of the interface. Seems to me that
this says that the interface body must specify the procedureness
somehow or other.
-- Richard Maine | Good judgment comes from experience; email: my first.last at org.domain | experience comes from bad judgment. org: nasa, domain: gov | -- Mark Twain
- Next message: Helge Avlesen: "SCons"
- Previous message: Gordon Sande: "Re: Who uses clapack?"
- In reply to: James Van Buskirk: "Re: Are procedure dummy arguments ignored in generic procedure resolution?"
- Next in thread: James Van Buskirk: "Re: Are procedure dummy arguments ignored in generic procedure resolution?"
- Reply: James Van Buskirk: "Re: Are procedure dummy arguments ignored in generic procedure resolution?"
- Reply: glen herrmannsfeldt: "Re: Are procedure dummy arguments ignored in generic procedure resolution?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|