Re: F2003: pass disallowed for procedure pointer components?
- From: nospam@xxxxxxxxxxxxx (Richard E Maine)
- Date: Thu, 28 Dec 2006 09:24:05 -0800
Reinhold Bader <Bader@xxxxxx> wrote:
C1212 (R1215) The name shall be the name of an abstract interface or
of a procedure that has an explicit interface. If name is declared by a
procedure-declaration-stmt it shall be previously declared. If name
denotes an intrinsic procedure it shall be one that is listed in 13.6 and
not marked with a bullet (?).
provided the second sentence of C1212 can be interpreted as having the
same meaning as "A /name/ referenced by a /procedure-declaration-stmt/
shall be previously declared."
No. I think you are misreading that. Horrible sentence, I agree, but it
does have a sensible literal interpretation - not an immediately obvious
one, but at least a literal one that would just constitute unclear
writing style, rather than an error. Your substitution of "referenced"
for "declared" assumes that the standard's wording is flatly in error;
there is no way that I can read the standard's actual wording as saying
that. "Defined" and "referenced" are not at all the same thing;
substituting one for the other would be a substantiative error - not
just sloppy or imprecise writing. Note by the way that "referenced"
would be wrong anyway because "referenced" has a precise meaning in the
standard and it isn't what you mean.
I'd read the sentence in question as follows. Consider
procedure (foo) .... :: bar
The name that C1212 refers to is foo - not bar. Foo might be declared in
any of several ways. One of those ways is that foo might have been
declared in a procedure declaration statement. If so, the constraint
says that the procedure declaration statement for foo must be previous
to the one shown above for bar. That is, this is just a
defined-before-used restriction for that case.
This doesn't apply to the code shown because foo isn't defined by a
procedure declaration statement.
--
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
.
- References:
- F2003: pass disallowed for procedure pointer components?
- From: Reinhold Bader
- F2003: pass disallowed for procedure pointer components?
- Prev by Date: Re: dummy argument assumed-size
- Next by Date: Re: Bit Concatenation
- Previous by thread: F2003: pass disallowed for procedure pointer components?
- Next by thread: Problem with my split routine I am not understanding
- Index(es):
Relevant Pages
|