### 15.2.2.5 PRIVATE Clause (TU*X only)

The PRIVATE clause declares specified variables to be private to each thread in a team. It takes the following form:

  PRIVATE (list)
  list
  Is the name of one or more variables or common blocks that are accessible to the scoping unit. Subobjects cannot be specified. Each name must be separated by a comma, and a named common block must appear between slashes (/ /).

Rules and Behavior

The following occurs when variables are declared in a PRIVATE clause:

- A new object of the same type is declared once for each thread in the team. The new object is no longer storage associated with the original object.
- All references to the original object in the lexical extent of the directive construct are replaced with references to the private object.
- Variables defined as PRIVATE are undefined for each thread on entering the construct and the corresponding shared variable is undefined on exit from a parallel construct.
- Contents, allocation state, and association status of variables defined as PRIVATE are undefined when they are referenced outside the lexical extent (but inside the dynamic extent) of the construct, unless they are passed as actual arguments to called routines.

For Compaq Fortran parallel directives, LOCAL is an alternative spelling for PRIVATE.

Previous Page Next Page Table of Contents