(j3.2006) Did we intend this to be OK?
Robert Corbett
robert.corbett
Wed Aug 17 22:29:06 EDT 2016
It might be standard conforming if "a" is properly
defined in the outer scope. Paragraph 9 of
Subclause 16.4 of 16-007r1 states
The associate names of an ASSOCIATE construct
have the scope of the block.
The second use of "a" is not in the block of the
ASSOCIATE construct, and so it is a reference to the
entity named by "a" in the outer scope.
Bob Corbett
On 8/17/2016 4:20 PM, Van Snyder wrote:
> Would the following associate statement be OK?
>
> associate ( a => x%y, b => a%z )
>
> I can't find a prohibition against it. If we want the answer to be
> "No," we need one. Something like
>
> C802a (R804) An <object-name> or <data-ref> in a <selector> shall not be
> an <associate-name> in the same <associate-stmt>.
>
> If we want the answer to be "Yes," the <association>s need to be
> considered left-to-right, which isn't specified. Something like
>
> C802a (R804) If an <object-name> or <data-ref> in a <selector> is an
> <associate-name> in the same <associate-stmt>, the <association>
> specifying that <associate-name> shall appear before the <association>
> containing that <selector>.
>
> Do we need to do one of these things?
>
> Do we need an interp?
>
> Can we take care of this at the next meeting, or do we need to do it
> with a corrigendum to F2015?
>
>
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3
More information about the J3
mailing list