SPL to HP C/XL Migration Guide (30231-90001)
5-3
| unsigned long int | any type | Other becomes unsigned long int |
||| |
---------------------------------------------------------------------------------------------
||| |
| long int | unsigned int | Both become unsigned long int |
||| |
---------------------------------------------------------------------------------------------
||| |
| long int | not unsigned int | Other becomes long int |
||| |
---------------------------------------------------------------------------------------------
When a value is stored (as in an assignment), it is converted to the
destination type.
Variables
Table 5-4. Variables
---------------------------------------------------------------------------------------------
|| |
| SPL | HP C/XL Equivalent |
|| |
---------------------------------------------------------------------------------------------
|| |
| Syntax of a variable in an expression: | Syntax of a variable in an expression: |
|| |
|1.
simple-id
|1.
simple-id
|
|| |
|2.
array/ptr-id
|2.
array/ptr-id "["
0
"]"
OR *
array/ptr-id
|
|| |
|3.
array/ptr-id
(
index
)|3.
array/ptr-id "[" index "]"
|
|| |
|4.@
identifier
|4.&
identifier
|
|| |
|5.@
array/ptr-id
|5.&
array/ptr-id "["
0
"]"
OR
array/ptr-id
|
|| |
|6.@
array/ptr-id
(
index
) | 6. &
array/ptr-id "[" index "]"
|
|| |
| 7. TOS | 7.
No equivalent.
|
|| |
| 8. ABSOLUTE (
index
)|8.
No equivalent.
|
|| |
---------------------------------------------------------------------------------------------
|| |
| Syntax of a variable on the left of an | Syntax of a variable on the left of an |
| assignment operator (:=): | assignment operator (=): |
|| |
|a.
simple-id
|a.
simple-id
|
|| |
|b.
array/ptr-id
|b.
array/ptr-id "["
0
"]"
OR *
array/ptr-id
|
|| |
|c.
array/ptr-id
(
index
)|c.
array/ptr-id "[" index "]"
|
|| |
|d.@
ptr-id
|d.
ptr-id
|
|| |
| e. TOS | e.
No equivalent.
|
|| |
| f. ABSOLUTE (
index
)|f.
No equivalent.
|
|| |
---------------------------------------------------------------------------------------------
|| |
| The address operator, "@", specifies the | The address operator is "&". |
| location of a variable, rather than its | |
| contents. | An unsubscripted array-id or pointer-id is |
| | an address rather than cell zero; either |
| An unsubscripted pointer-id or array-id is | add the subscript or use the "*" operator. |
| assumed to be subscripted by zero. | |
|| |
| See "Addresses (@) and Pointers" below. | |
|| |
---------------------------------------------------------------------------------------------
|| |
| The assignment operator is ":=". | The assignment operator is "=". |
|| |