SPL to HP C/XL Migration Guide (30231-90001)

8-: 15
| Default type: LOGICAL | Default type: int (= long int) |
| | |
---------------------------------------------------------------------------------------------
| | |
| An OWN local pointer is allocated storage | Same as SPL, using a static local array. |
| global to the procedure, in the DB-relative | |
| area. It retains its values between | |
| successive calls to the procedure. | |
| | |
---------------------------------------------------------------------------------------------
| | |
| OWN pointers cannot be initialized. | static pointers may be initialized, using |
| | the syntax given for forms 1b and 1c in |
| | "POINTER Declaration". |
| | |
| | The pointer is initialized once, at the |
| | start of the program, not every time the |
| | function is called. |
| | |
---------------------------------------------------------------------------------------------
EXTERNAL Local Pointers.
Table 8-17. EXTERNAL Local Pointers
---------------------------------------------------------------------------------------------
| | |
| SPL | HP C/XL Equivalent |
| | |
---------------------------------------------------------------------------------------------
| | |
|
external-local-pointer
: |
extern-local-pointer
: |
| | |
| EXTERNAL
type ptr-id
[,...] ; | extern
type ptr-id
[,...] ; |
| | |
---------------------------------------------------------------------------------------------
| | |
| Default type: LOGICAL | Default type: int (= long int) |
| | |
---------------------------------------------------------------------------------------------
| | |
| An EXTERNAL local pointer refers to a | Similar to SPL. |
| global pointer that is declared GLOBAL in a | |
| separate compilation unit. The storage is | An extern local pointer refers to a global |
| allocated by the other unit. | pointer that is
not
declared static in a |
| | separate compilation unit. The storage is |
| | allocated by the other unit. See "Types of |
| | Declarations". |
| | |
---------------------------------------------------------------------------------------------
Local LABEL Declarations
See "LABEL Declaration" for further details.
Table 8-18. Local LABEL Declaration
---------------------------------------------------------------------------------------------
| | |
| SPL | HP C/XL Equivalent |
| | |
---------------------------------------------------------------------------------------------
| | |
|
label-declaration
: | No equivalent. |
| | |
| LABEL
label-id
[,...] ; | |
| | |
---------------------------------------------------------------------------------------------
| | |
| Declaration of labels is optional. | Labels are not declared. |
| | |