dpb <
no...@non.net> wrote:
> On 10/14/2012 10:23 AM, Dick Hendrickson wrote:
> > Someone recently asked whether or not the :: was allowed in a MODULE
> > PROCEDURE statement. As far as I can tell, the "::" was not allowed in
> > F2003 MODULE PROCEDURE statements and is now optional in F2008.
> ...
>
> It's never been clear to me whether there's/re a place/s where the :: is
> actually required; seems like it's always optional in the places I can
> remember. I presume there must be _somewhere_ to be required for syntax
> disambiguation or it wouldn't have been introduced???
It is required in a type declaration statement that has any attr-specs.
That's not said in words; it just falls out of the bnf. If it were not
required, consider... hmm. When I try to do an example off the top of my
head, the required commas do disambiguate, though the difference between
real, save, x
and
real save, x
would be pretty tricky (fixed source form; I recall bitching that
several bits of syntax could be simpler if they were restricted to free
source form. But that got zero support, even when they were new syntax
bits that could not directly be a problem for compatibility with old
code). I swear I recall some cases that were actually ambiguous without
that requirement, but my off-the-top-of-my-head examples don't show
that. Anyway, the standard does require the double colon there.
Also, C523 (of f2003)
"If <initialization> appears, the double-colon separator shall
appear..."
For that one, making an example of the ambiguity is much simpler... as
in it is hard to do an example that isn't ambiguous (hard as in I don't
see how).
real x = 1.234
Sure looks like an assignment statement to me (in fixed source form).
--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain