J3/98-228r1
Date: 11 November 1998
To: J3
From: Data
Subject: M24 - Mixed public/private components: Edits
References: J3/98-198 Mixed public/private components specs/syntax
J3/98-007r3
[40:1+] Add
or
[40:43+] Add
or
Constraint: An (5.1.2.2) within a is permitted only if the type
definition is within the specification part of a module.
[48:1-5] Change to
If a type definition contains a PRIVATE statement that is a , the default
accessibility of its components is PRIVATE; otherwise the default accessibility of its components is
PUBLIC. If a component name is private, the internal structure of the type is inaccessible in any scoping
unit accessing the module via a USE statement. Similarly, if any component name is private, the structure
constructor for such a type shall be employed only within the defining module.
[48:28-32] Replace with
NOTE 4.32
The accessibility of a type name is independent of the accessibility of the components of the type. It is
possible to have all four combinations: a public name with a public component, a private name with a
private component, a public name with a private component, and a private name with a public component.
The accessibility of a component of a structure is independent of the accessibility of any other component of
the structure.
[49:7+] Add
NOTE 4.34a
If a type definition contains a PRIVATE statement (that is a ), the accessibility of a
component may be overridden by an individual PUBLIC specification:
TYPE MIXED
PRIVATE
INTEGER :: I
INTEGER, PUBLIC :: J
END TYPE MIXED
TYPE (MIXED) M
M%J is accessible in any scoping unit accessing the module in which MIXED is defined; M%I is not.
[54:26+] Add
Constraint: All components shall be accessible in the scoping unit containing the .
[55:9] Change comment to "Nested form, all components of"
[55:11] Change comment to "Flattened form, all components of"
[65:26-27] Change "Entities without ..." to "Entities without an explicitly specified have
default accessibility. Default accessibility for a module is PUBLIC unless it has been changed by a
PRIVATE statement (5.3.3)."
[377:7+] Add
C.1.? Extensible Types
The default accessibility of an extended type may be specified in the type definition. The accessibility of its
components may be specified individually. [Insert the example on the second page of 98-198, changing the
7th line from "end type my_type" to "end type base_type", changing "public :: base_type" to "base_type" and
changing "private :: my_type" to "my_type".