SPL to HP C/XL Migration Guide (30231-90001)
8-: 17
You may emulate multiple entry points into an SPL procedure by adding a
parameter to the HP C/XL function, and coding a switch statement in the
function to goto the appropriate labels based on the value of the
parameter. See "Local SWITCH Declarations" above for the format.
Entry point identifiers used in calling routines must be changed to the
procedure identifier. Alternatively, global #define directives could be
used to equate the entry point identifiers with the procedure identifi-
er.
You might also create #define macro directives with different names,
each of which calls the original function with the index parameter sup-
plied as a constant.
Or you might rewrite the procedure as several HP C/XL functions named by
the entry point identifiers.
Local DEFINE Declaration and Reference
See "DEFINE Declaration and Reference" for further details.
Table 8-21. DEFINE Declaration and Reference
---------------------------------------------------------------------------------------------
| | |
| SPL | HP C/XL Equivalent |
| | |
---------------------------------------------------------------------------------------------
| | |
|
define-declaration
: |
define-directive
: |
| | |
| DEFINE {
define-id
=
text
#} [,...] ; | #define
define-id text
|
| | |
| | ... |
| | |
| | #undef
define-id
|
| | |
---------------------------------------------------------------------------------------------
| | |
| The scope of a local DEFINE declaration is | The scope of a #define directive is not |
| the procedure. | local. It is known to all following source |
| | code. To turn it off, insert the #undef |
| | directive at the end of the function. |
| | |
---------------------------------------------------------------------------------------------
Local EQUATE Declaration and Reference
See "EQUATE Declaration and Reference" for further details.
Table 8-22. Local EQUATE Declaration and Reference
---------------------------------------------------------------------------------------------
| | |
| SPL | HP C/XL Equivalent |
| | |
---------------------------------------------------------------------------------------------
| | |
|
equate-declaration
: |
define-directive
: |
| | |
| EQUATE {
equateid
=
equate-expr
}[,...]; | #define
equateid equate-expr
|
| | |
| | ... |