(j3.2006) (no subject)
Bill Long
longb
Fri Mar 13 18:34:16 EDT 2009
Michael Ingrassia wrote:
> > The procedure declaration statement appears to violate C1219
> > (09-007:[291:26-27]).
>
> Does it? As I read it C1219 asks if sin (the proc-interface) is
> elemental, and when it
> is, requires that p (the procedure-entity-name) should specify an
> external procedure.
> And p isn't intrinsic or a dummy procedure or an internal procedure so
> it must be
> an external procedure, right? If so, no censure from C1219.
>
> >What is the rationale for this constraint?
>
> According to the first sentence of the section, a procedure
> declaration statement
> defines procedure pointers (which by definition have the EXTERNAL
> attribute),
> dummy procedures, and external procedures.
That sentence is the key - procedure pointers and external procedures
are separate classes of things. If you look at the definition of
"external procedure" in Clause 1, it is an actual procedure (a procedure
defined by an external subprogram). It does not seem like a pointer
satisfies that requirement. Ultimately, it seems that an external
procedure is something that has its name or binding label in the
external symbol table. That is not the case for a dummy dummy procedure
or for a procedure pointer.
Cheers,
Bill
> So a constraint that says
> procedure-entity-namehas to be an external procedure is pretty
> much just ruling out
> dummy procedures. Maybe part of the rationale is to avoid stealth
> declarations of
> elemental dummies which don't visibly use the ELEMENTAL keyword?
> Certainly it would make it hard for tools
> which try to parse only the SUBROUTINE statement to understand the
> interface cheaply.
>
> --Michael I.
>
>
>
>
> ------------------------------------------------------------------------
> Express your personality in color! Preview and select themes for
> Hotmail?. See how.
> <http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=TXT_MSGTX_WL_HM_express_032009#colortheme>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> J3 mailing list
> J3 at j3-fortran.org
> http://j3-fortran.org/mailman/listinfo/j3
>
--
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120
More information about the J3
mailing list