SPL to HP C/XL Migration Guide (30231-90001)
3- 8
Equated Integers
Table 3-13. Equated Integer Constants
---------------------------------------------------------------------------------------------
| | |
| SPL | HP C/XL Equivalent |
| | |
---------------------------------------------------------------------------------------------
| | |
|
equated-integer
: |
defined-constant
: |
| | |
| [
sign
]
identifier
[D] | [-]
identifier
|
| | |
---------------------------------------------------------------------------------------------
| | |
|
identifier
|
identifier
|
| is assigned a numeric value in an EQUATE | is assigned a literal value in a #define |
| declaration. It represents a 16-bit | directive. The literal is inserted at |
| INTEGER value. | the reference point. |
| | |
| If D is specified, the value is extended on | Note that, while SPL evaluates an equated |
| the left with zeros to a 32-bit DOUBLE | integer when it is declared, HP C/XL |
| value. | evaluates the literal when the
reference
is |
| | compiled. |
| | |
---------------------------------------------------------------------------------------------
See "EQUATE Declaration and Reference".
Real Constants
Table 3-14. Real Constants
---------------------------------------------------------------------------------------------
| | |
| SPL | HP C/XL Equivalent |
| | |
---------------------------------------------------------------------------------------------
| | |
| Type: REAL | Type: float |
| | |
---------------------------------------------------------------------------------------------
| | |
|
real-constant
: |
real-constant
: |
| 1. [
sign
]
fixed-point-number
[E
power
] | 1. [-]
fixed-point-number
[E
power
] |
| 2. [
sign
]
decimal-integer
E
power
| 2. [-]
decimal-integer
E
power
|
| 3. [
sign
]
based|composite-integer
E | 3.
(No equivalent; convert to 1 or 2.)
|
| | The E may be in lowercase. |
| | |
---------------------------------------------------------------------------------------------
CAUTION Since MPE XL floating-point format is different from MPE V
floating point, REAL based and composite constants must be
carefully translated if they are intended for arithmetic use.