(j3.2006) local identifier defined by USE statement

Robert Corbett robert.corbett
Tue Mar 3 21:42:12 EST 2015


I am concerned that we might have extended the language by the edits
in part 2 of paper 15-110r4.  My recollection is that the committee
does not consider the code fragment

       MODULE M
         TYPE T
           INTEGER I
         END TYPE
       END

       TYPE(T) FUNCTION F()
         USE M
         F.I = 1
       END

to be standard conforming.

After the edits,

     (1) the rule that the type name T must be previously defined
         is eliminated, and

     (2) the type T is previously defined because it is use
         associated.

Therefore, after the edits, the FUNCTION statement is standard
conforming.

Robert Corbett


On 03/02/15 20:38, Malcolm Cohen wrote:
> Why would you care whether an identifier is "previously defined" vs. the entity
> is "previously defined"?  All the cases I looked at were talking about the
> entity, not the identifier as such...
>
> ...if you have a case where it is the identifier that matters, please identify
> it!
>
> Cheers,
>
> -----Original Message-----
> From: Robert Corbett
> Date: ?? 27?3?3? 13:00
> To: j3
> Subject: (j3.2006) local identifier defined by USE statement
>
> Does the standard say that a local identifier that is use associated with an
> identifier defined in a module is defined by the USE statement(s) that make(^s)
> it accessible?  The question of where the local identifier is defined is
> relevant to whether the identifier is "previously defined".
>
> Bob Corbett
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3
>
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star.
> ________________________________________________________________________
>




More information about the J3 mailing list