(j3.2006) local identifier defined by USE statement

Malcolm Cohen malcolm
Wed Mar 4 02:16:41 EST 2015


Robert Corbett writes:
<<<
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.
>>>

Indeed it is not.  "F.I" is not valid syntax.  Changing it to F%I makes 
everything ok though.  In other words, if you claim we decided it was not 
conforming I would like to see some normative text, non-normative text, or 
interp which says that.  I don't remember any such thing offhand.

<<<
After the edits,

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

There is no such rule.

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

Yes, the pre-existing rule in 10-007r1 is

  "Where a data entity is declared explicitly using the TYPE type specifier to 
be of derived type, the specified derived type shall have been defined 
previously in the scoping unit or be accessible there by use or host 
association."

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

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

Cheers,
-- 
................................Malcolm Cohen, Nihon NAG, Tokyo. 




More information about the J3 mailing list