Re: Are procedure dummy arguments ignored in generic procedure resolution?

From: Richard E Maine (nospam_at_see.signature)
Date: 12/10/04


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


Relevant Pages

  • Re: Interface declarations
    ... function, it must also have an interface block for f_dummy2, right? ... have an interface block for their f_dummy*() dummy argument. ... Scope doesn't work that way. ...
    (comp.lang.fortran)
  • multiple dummy interfaces?
    ... I'm moving from an older redhat to FC3 and I had multiple IP addresses ... /sbin/ifconfig dummy0 www.domain0.com up ... I was able to load one dummy interface ...
    (Fedora)
  • Re: understanding hacmp5 and IP aliasing
    ... >>I now want to setup a cluster but with using IP aliases.The manual ... >>I need to have boot and service networks on seperate subnets. ... > standby address = dummy address ... > interface at all times and the real service addresses are ...
    (comp.unix.aix)
  • More ifc 8 woes
    ... Now, ifort is throwing another ... The relevant INTERFACE block is ... PURE FUNCTION GetReqAbsErrors(ys, deltays, gradients, x, h) RESULT( ... characteristics of dummy argument 3 of the dummy procedure. ...
    (comp.lang.fortran)
  • Re: understanding hacmp5 and IP aliasing
    ... Your current standby addresses are in a different subnet but you ... standby address = dummy address ... interface at all times and the real service addresses are ...
    (comp.unix.aix)