<Syntax> |
|
|
|
type, PROTECTED [ , attr ]... :: decl-list
PROTECTED [ :: ] name [ , name ]...
The PROTECTED attribute is only permitted in the specification part of a module program unit.
|
|
|
|
|
|
<Semantics> |
|
|
|
The PROTECTED attribute protects a module variable against alteration from outside the module.
Outside of its module, a variable with the PROTECTED attribute may be referenced but not defined;
it is subject to the same limitations as an INTENT(IN) variable.
Note that the PROTECTED attribute is completely separate from the accessibility (PUBLIC/PRIVATE) attribute.
The latter determines the visibility of the variable name, whereas PROTECTED determines what may be done to it.
|
|
|
|
|
|
<Related> |
|
|
|
MODULE statement,
PRIVATE attribute,
PUBLIC attribute,
Type Declaration statement |
|
|