EQUATE Declaration and Reference [ SPL to HP C/XL Migration Guide ] MPE/iX 5.0 Documentation
SPL to HP C/XL Migration Guide
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 Integers".
MPE/iX 5.0 Documentation