Simple Variable Declarations
Table 4-2. Simple Variable Declaration
----------------------------------------------------------------------------------------------
| | |
| SPL | HP C/XL Equivalent |
| | |
----------------------------------------------------------------------------------------------
| | |
| simple-variable-declaration: | simple-variable-declaration: |
| | |
| [GLOBAL] type variable-defn [,...] ; | [static] type variable-defn [,...] ; |
| | |
----------------------------------------------------------------------------------------------
| | |
| variable-defn: | variable-defn: |
| | |
| 1a. variable-id | 1a. variable-id |
| | |
| 1b. variable-id := initial-value | 1b. variable-id = initial-value |
| | |
| 2a. variable-id = register | |
| | |
| 2b. variable-id = register sign offset | |
| | |
| 3a. variable-id = ref-id | |
| | |
| 3b. variable-id = ref-id sign offset | |
| | |
----------------------------------------------------------------------------------------------
Simple variables in formats 2 and 3 are usually various types of data
equivalences. They may be converted to pointers or union equivalences,
depending on the requirements of the program. See "ARRAY Declaration"
below for further examples.