SPL to HP C/XL Migration Guide (30231-90001)
8-: 13
| | static [
type
]*
array-id
|
|| |
||=&
array-ref "
[
" index "
]
"
;|
|| |
|| |
||
init
:|
||=
"
{
" value
[,...]
"
}
"
|
|| |
|| |
||
index
:|
| | Cell number in
array-ref
of cell that |
| | corresponds to cell zero in SPL array. |
|| |
---------------------------------------------------------------------------------------------
|| |
| Default type: LOGICAL | Default type: int (= long int) |
|| |
---------------------------------------------------------------------------------------------
|| |
| An OWN local array 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. | |
|| |
| If an initial value is declared for an OWN | |
| array, the variable is initialized once, at | |
| the start of the program, not every time | |
| the procedure is called. | |
|| |
---------------------------------------------------------------------------------------------
EXTERNAL Local Arrays.
Table 8-14. EXTERNAL Local Arrays
---------------------------------------------------------------------------------------------
| | |
| SPL | HP C/XL Equivalent |
| | |
---------------------------------------------------------------------------------------------
| | |
|
external-array-declaration
: |
extern-array-declaration
: |
| | |
| EXTERNAL [
type
] ARRAY | Direct with
lower
=0. |
| | |
|{
array-id
{(*) | extern [
type
]
array-id "
[
""
]
"
;|
| (@)}} [,...] ; | |
| | |
| | Indirect, or direct with
lower
<> 0. |
| (*) signifies a direct array. | |
| | extern [
type
]*
array-id
|
| | |
| (@) signifies an indirect array. | |
| | |
---------------------------------------------------------------------------------------------
| | |
| Default type: LOGICAL | Default type: int (= long int) |
| | |
---------------------------------------------------------------------------------------------
| | |
| An EXTERNAL local array refers to a global | Similar to SPL. |
| array that is declared GLOBAL in a separate | |
| compilation unit. The storage is allocated | An extern local array refers to a global |
| by the other unit. | array that is
not
declared static in a |
| | separate compilation unit. The storage is |
| | allocated by the other unit. |
| | |
---------------------------------------------------------------------------------------------
See "Types of Declarations" for further details.