HP 3000 Manuals

Subroutines [ SPL to HP C/XL Migration Guide ] MPE/iX 5.0 Documentation


SPL to HP C/XL Migration Guide

Subroutines 

          Table 2-8.  Subroutines 

---------------------------------------------------------------------------------------------
|                                             |                                             |
|                     SPL                     |             HP C/XL Equivalent              |
|                                             |                                             |
---------------------------------------------------------------------------------------------
|                                             |                                             |
| Can appear within procedures and globally.  | No direct equivalent.                       |
|                                             |                                             |
---------------------------------------------------------------------------------------------

If possible, you should recode SPL subroutines as HP C/XL #define macro
directives, which permit parameters, and result in inline substitution.
Where appropriate (i.e., in functions), limit the scope of a #define
directive with a subsequent #undef directive.

Otherwise, you must recode the SPL subroutine as an HP C/XL independent
function.  This can be awkward because variables that were formerly local
to the procedure and known to the subroutine have to be made available to
the new function.  You can make variables available to new functions
either by declaring them as global (to all functions) or by passing them
as parameters.

See "SUBROUTINE Declaration".



MPE/iX 5.0 Documentation