(j3.2006) Public Comment J32025

Michael Ingrassia michaeli
Tue Jul 8 20:28:22 EDT 2008

To: J3
From: Michael Ingrassia
Subject: Public Comment J32025
Date: 2008 July 08

Commenter's Subject was "types declared to be PRIVATE"

When the standard speaks of a type declared to be
PRIVATE, it means a type declared to be PRIVATE in
the scoping unit in which the type definition that
declared that type appeared.  The standard should
say that somewhere.

For example, in the program

       MODULE MOD1
         TYPE T
           INTEGER :: I
         END TYPE
         TYPE(T) :: X

       MODULE MOD2
         USE MOD1
         PRIVATE T
         TYPE(T) :: Y

         USE MOD2
         Y%I = 12
         X = Y

The type T in module MOD2 is not considered a type
declared to be PRIVATE, and so there is no conflict
between the first and last sentences of the second
paragraph in Section of the standard.


More information about the J3 mailing list