POINTER Declaration

The POINTER declaration declares a pointer. A pointer can represent the address of a character position in a one-dimensional array or an array row. Therefore, the point is said to point to a character position.

<pointer declaration>

──┬───────┬─ POINTER ──────────────────────────────────────────────────►
  └─ OWN ─┘
  ┌◄────────────────────── , ─────────────────────┐
►─┴─<identifier>─┬──────────────────────────────┬─┴────────────────────┤
                 └─<lex level restriction part>─┘

<pointer identifier>

An identifier that is associated with a pointer in a POINTER declaration.

The POINTER declaration establishes each identifier in the list as a pointer identifier.

The following declaration, for example, declares PTS, PTD, SOURCE, and DEST to be pointers:

POINTER PTS,PTD,SOURCE,DEST

Pointers are initialized through the use of a pointer assignment statement or the update pointer construct. Any attempt to use a pointer before it is initialized results in a fault at run time.