OpenTP1 Version 7 Programming Reference C Language

[Contents][Index][Back][Next]

Pointer attribute

Format

ref
ptr

Attribute meaning

The pointer attribute specifies a pointer class: reference pointer (ref) or complete pointer (ptr).

Explanation

Explanations of the reference pointer

A reference pointer is a simple-format pointer. The general use of the pointer is to deliver integers with reference.

The reference pointer has higher efficiency than the complete pointer; however, it has the following restrictions:

  1. Linkage cannot be terminated since the reference pointer does not support NULL values.
  2. A list with linkage cannot be created with the reference pointer.

The reference pointer has the following characteristics:

Explanations of the complete pointer

A complete pointer is a complex-format pointer. The complete pointer can use all pointer-related facilities. For example, complex data structures such as a list with linkage, tree, queue, or arbitrary graph can be created.

The complete pointer has the following characteristics:
  • A complete pointer value can be changed during a function call.
  • No alias can be used with IDL-only TxRPC.
  • The storage area for another complete pointer used by the same operation parameter can be pointed to. In this case, however, the pointer needs to point to the start of the structure. For example, the pointer to the basic structure or duplicated storage area cannot be used if the next code is incorporated in the interface definition code.