SPL to HP C/XL Migration Guide (30231-90001)
8-: 9
EXTERNAL Simple Variables.
Table 8-11. EXTERNAL Local Simple Variables
---------------------------------------------------------------------------------------------
| | |
| SPL | HP C/XL Equivalent |
| | |
---------------------------------------------------------------------------------------------
| | |
|
external-simple-variable-declaration
: |
extern-simple-variable-declaration
: |
| | |
| EXTERNAL
type variable-id
[,...] ; | extern [
type
]
variable-id
[,...] ; |
| | |
---------------------------------------------------------------------------------------------
| | |
|
type
is required. | Default type: int (= long int) |
| | |
---------------------------------------------------------------------------------------------
| | |
| An EXTERNAL local variable refers to a | Similar to SPL. |
| global variable that is declared GLOBAL in | |
| a separate compilation unit. The storage | An extern local variable refers to a global |
| is allocated by the other unit. | variable that is
not
declared static in a |
| | separate compilation unit. The storage is |
| | allocated by the unit that defines it. |
| | |
---------------------------------------------------------------------------------------------
See "Types of Declarations" for more detail.
Local Array Declarations
Standard Local Arrays.
Table 8-12. Standard Local Arrays
---------------------------------------------------------------------------------------------
|| |
| SPL | HP C/XL Equivalent |
|| |
---------------------------------------------------------------------------------------------
|| |
|
standard-local-array-declaration
:|
array-declaration
:|
|| |
|[
type
] ARRAY | 1b with
lower
=0. |
|| |
|[
local-array-decl
,] [...] | [
type
]
array-id "
[
" cells "
]
"
;|
|| |
|{
local-array-decl
||
|
constant-array-decl
} ; | 1a; 1b with
lower
<> 0. |
|| |
||[
type
]
array-ref "
[
" cells "
]
"
;|
|
local-array-decl
:| |
|| |
| 1a.
array-id
(
lower
:
upper
)|[
type
]*
array-id
|
|| |
| 1b.
array-id
(
lower
:
upper
)=Q | =&
array-ref "
[
" index "
]
"
;|
|| |
|2.
array-id
(
var-lower
:
var-upper
)| |
| | 10 with
lower
=0. |
|3.
array-id
(@)=Q | |
| | static [
type
]
array-id "
[
" cells "
]
" init:
|
|4.
array-id
(*)=Q | |
|| |
| 5a.
array-id
(@) | 10 with
lower
<> 0. |
|| |
| 5b.
array-id
(@) =
register sign offset
|static [
type
]
array-ref "
[
" cells "
]
"init
;|
|| |
|6.
array-id
(*) | |
| | static [
type
]*
array-id
|