SPL to HP C/XL Migration Guide (30231-90001)
3- 9
Long Constants
Table 3-15.
---------------------------------------------------------------------------------------------
| | |
| SPL | HP C/XL Equivalent |
| | |
---------------------------------------------------------------------------------------------
| | |
| Type: LONG | Type: double |
| | |
---------------------------------------------------------------------------------------------
| | |
|
long-constant
: |
real-constant
: |
| 1. [
sign
]
fixed-point-number
L
power
| 1. [-]
fixed-point-number
[E
power
]; |
| 2. [
sign
]
decimal-integer
L
power
| 2. [-]
decimal-integer
E
power
|
| 3. [
sign
]
based|composite-integer
L | 3.
(No equivalent; convert to 1 or 2.)
|
| | The E may be in lowercase. |
| | |
---------------------------------------------------------------------------------------------
HP C/XL uses the same representation for float and double constants.
CAUTION Since MPE XL floating-point format is different from MPE V
floating point, LONG based and composite constants must be
carefully translated if they are intended for arithmetic use.
Logical Constants
Table 3-16. Logical Constants
---------------------------------------------------------------------------------------------
| | |
| SPL | HP C/XL Equivalent |
| | |
---------------------------------------------------------------------------------------------
| | |
| Type: LOGICAL | Type: unsigned short int |
| | |
---------------------------------------------------------------------------------------------
| | |
| TRUE (logical value: 65535; integer value: | No direct equivalent. May be specified |
| -1) | with |
| | |
| | #define TRUE 1 |
| | |
---------------------------------------------------------------------------------------------
| | |
| FALSE (zero) | No direct equivalent. May be specified |
| | with |
| | |
| | #define FALSE 0 |
| | |
---------------------------------------------------------------------------------------------
| | |
| INTEGER, LOGICAL, or BYTE constant: | Any numeric constant (including char): |
| | |
| * true if bit 15 is on (value is odd) | * true if value is nonzero. |
| * false if bit 15 is off (value is even) | * false if value is zero. |
| | |
---------------------------------------------------------------------------------------------