(j3.2006) the ASSOCIATE statement in Fortran 2003

Van Snyder Van.Snyder
Mon Mar 5 16:10:53 EST 2012


On Mon, 2012-03-05 at 12:41 -0800, Robert Corbett wrote:
> Suppose F is a function that produces a data pointer value
> as a result.  Was it standard conforming to use a
> reference to F as a selector in an ASSOCIATE statement
> in Fortran 2003?
> 
> Consider
> 
>        ASSOCIATE (X => F())
> 
> Clause 8.1.4.3 of the Fortran 2003 standard does not
> appear to give X the POINTER attribute, but paragraph 3
> of Clause 7.1.4.1 does not cover the case of a
> selector.

The relationship between the associate-name and selector was consciously
based upon argument association.

We might need a few more words to make it clear that if the selector is
a pointer it has to be associated, and the associate-name is associated
with the selector's target.

Similar considerations apply for allocatable selectors.





More information about the J3 mailing list