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

4-14
directive in parentheses to ensure correct evaluation of the actual
parameters.
EQUATE Declaration and Reference
Table 4-9. EQUATE Declaration and Reference
---------------------------------------------------------------------------------------------
| | |
| SPL | HP C/XL Equivalent |
| | |
---------------------------------------------------------------------------------------------
| | |
|
equate-declaration
: |
define-directive
: |
| | |
| | #define
equate-id equate-expr
|
| EQUATE {
equate-id
=
equate-expr
}[,...] | |
| | |
| | |
---------------------------------------------------------------------------------------------
| | |
| An equate declaration computes the value of | A #define directive assigns the characters |
| the
equate-expr
, left-truncates it if | of
equate-expr
to
equate-id
without |
| necessary, and assigns it to
equate-id
as a | evaluation. |
| 16-bit INTEGER. | |
| | The
equate-id
is evaluated and compiled |
| The value of
equate-id
is determined
when
|
where it is referenced
, not in the |
|
it is declared
, not when it is referenced. | declaration. |
| | |
---------------------------------------------------------------------------------------------
| | |
| The declaration is referenced by using its | Same as SPL. |
|
equate-id
anywhere in the subsequent source | |
| file. | |
| | |
---------------------------------------------------------------------------------------------
See also "DEFINE Declaration and Reference" above and "Equated Inte-
gers".
DATASEG Declaration and Reference
Table 4-10. DATASEG Declaration and Reference
---------------------------------------------------------------------------------------------
|||
| SPL | HP C/XL Equivalent |
|||
---------------------------------------------------------------------------------------------
|||
|
dataseg-declaration
: | No equivalent. |
|||
| DATASEG
dataseg-name
=
dataseg-num
| The concept of extra data segments does not |
| | exist in HP C/XL. |
| BEGIN | |
|||
|
type dataseg-variable
[=
dataseg-offset
]| |
|||
| ... | |
|||
| END ; | |
|||
---------------------------------------------------------------------------------------------
Remove the DATASEG declaration and convert the variables in the BEGIN-
END block to normal HP C/XL variables.