VMS Help  —  FORTRAN  Statements  POINTER
  Specifies that an object is a pointer.

  The POINTER attribute can be specified in a type declaration
  statement or an POINTER statement, and takes one of the following
  forms:

  Type Declaration Statement:

   type, [att-ls,] POINTER [,att-ls] :: ptr [(spec)] [,ptr [(spec)]]...

  Statement:

   POINTER [::] ptr [(spec)] [,ptr [(spec)]]...

     type      Is a data type specifier.

     att-ls    Is an optional list of attribute specifiers.

     ptr       Is the name of the pointer.  The pointer
               cannot be declared with the INTENT or
               PARAMETER attributes.

     spec      Is a deferred-shape specification
               (: [,:]...).

  A pointer must not be referenced or defined unless it becomes
  pointer associated (through pointer assignment or an ALLOCATE
  statement) with a target object that can be referenced or defined.
  An object with the POINTER attribute has no initial storage set
  aside for it.

  If the pointer is an array, and it is given the DIMENSION attribute
  elsewhere in the program, it must be declared as a deferred-shape
  array.

  A pointer cannot be specified in an EQUIVALENCE or NAMELIST
  statement.

  The POINTER attribute is compatible with the AUTOMATIC, DIMENSION
  (with deferred shape), OPTIONAL, PRIVATE, PUBLIC, SAVE, STATIC, and
  VOLATILE attributes.

  EXAMPLES:

  The following example shows type declaration statements specifying
  the POINTER attribute:

     TYPE(SYSTEM), POINTER :: CURRENT, LAST
     REAL, DIMENSION(:,:), POINTER :: I, J, REVERSE

  The following is an example of the POINTER statement:

     TYPE(SYSTEM) :: TODAYS
     POINTER :: TODAYS, A(:,:)
Close Help