HP 3000 Manuals

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


SPL to HP C/XL Migration Guide

Function Designator 

          Table 5-9.  Function Designator 

-----------------------------------------------------------------------------------------------
|                                             |                                               |
|                     SPL                     |              HP C/XL Equivalent               |
|                                             |                                               |
-----------------------------------------------------------------------------------------------
|                                             |                                               |
| function-designator:                        | function-designator:                          |
|                                             |                                               |
|      1. function-id                         |      1. function-id ( )                       |
|                                             |                                               |
|      2. function-id ( )                     |      2. function-id ( )                       |
|                                             |                                               |
|      3. function-id ( actual-parm [,...] )  |      3. function-id ( actual-parm [,...] )    |
|                                             |                                               |
-----------------------------------------------------------------------------------------------
|                                             |                                               |
| actual-parm:                                | actual-parm:                                  |
|                                             |                                               |
|      a. simple-variable-id                  |      a. simple-variable-id                    |
|                                             |                                               |
|      b. array/ptr-id                        |      b. array/ptr-id "["0"]" OR *array/ptr-id |
|                                             |                                               |
|      c. array/ptr-id ( index )              |      c. array/ptr-id "[" index "]"            |
|                                             |                                               |
|      d. procedure-id                        |      d. function-id                           |
|                                             |                                               |
|      e. label-id                            |      e. (No equivalent)                       |
|                                             |                                               |
|      f. arithmetic-expression               |      f. numeric-expression                    |
|                                             |                                               |
|      g. logical-expression                  |      g. numeric-expression                    |
|                                             |                                               |
|      h. assignment-statement                |      h. assignment-expression                 |
|                                             |                                               |
|      i. *                                   |      i. (No equivalent)                       |
|                                             |                                               |
-----------------------------------------------------------------------------------------------
|                                             |                                               |
| A typed procedure (or subroutine) may be    | A function may be used in a numeric           |
| used as a function in an arithmetic or      | expression, except if the function is typed   |
| logical expression.                         | as void.                                      |
|                                             |                                               |
| Formats 1 and 2 are equivalent.             | As shown in format 1, HP C/XL requires the    |
|                                             | parentheses even if there are no actual       |
|                                             | parameters.                                   |
|                                             |                                               |
-----------------------------------------------------------------------------------------------

See "Procedure Call Statement" and "Data Type" for more details about
parameters passed by reference.



MPE/iX 5.0 Documentation