PRIVATE attribute
Standard: F77 F90 F95 F2003
  Example Program
type, PRIVATE [ , attr ] :: decl-list

PRIVATE [ :: ] name [ , name ]...


The PRIVATE attribute is only permitted in the specification part of a module program unit.
The PRIVATE attribute specifies that an entity is local to the module, and is not accessible from other program units. It is the opposite to the PUBLIC attribute.

A PRIVATE statement with no list of names declares that all entities in the module are private, except for those which are explicitly declared PUBLIC.

A derived type definition in a module may contain a PRIVATE statement in its component definition part; it declares the default accessibility to be PRIVATE for components of the type.

In Fortran 2003, the PRIVATE statement can also occur in the type-bound procedure part, where it declares the default accessibility to be PRIVATE for type-bound procedures; furthermore, individual components and type-bound procedures may be declared PRIVATE in their component definition statement or type-bound procedure statement.
Component Definition statement, MODULE statement, PROTECTED attribute, PUBLIC attribute, Type Declaration statement