HP 3000 Manuals

CALLING VPLUS/V INTRINSICS [ HP Data Entry and Forms Management System (VPLUS/V) ] MPE/iX 5.0 Documentation


HP Data Entry and Forms Management System (VPLUS/V)

CALLING VPLUS/V INTRINSICS 

The examples in Table 6-2 show the format for calls to the VPLUS/V
intrinsics from each language, where:

intrinsicname    Identifies the intrinsic being called.

parameter        At least one parameter is required for each intrinsic;
                 the particular parameters are listed in the formats for
                 the individual intrinsic descriptions.

          Table 6-2.  Examples of Intrinsic Call Formats for Each Language 

---------------------------------------------------------------------------------------------
|                   |                                                                       |
|     Language      |                         Intrinsic Call Format                         |
|                   |                                                                       |
---------------------------------------------------------------------------------------------
|                   |                                                                       |
| COBOL             | CALL "intrinsicname" USING parameter1 [, parameter2]...               |
|                   |                                                                       |
---------------------------------------------------------------------------------------------
|                   |                                                                       |
| FORTRAN           | CALL intrinsicname (parameter1 [,parameter2]...)                      |
|                   |                                                                       |
---------------------------------------------------------------------------------------------
|                   |                                                                       |
| BASIC             | label CALL intrinsicname(parameter1[,parameter2]...)                  |
|                   |                                                                       |
---------------------------------------------------------------------------------------------
|                   |                                                                       |
| PASCAL            | intrinsicname(parameter1[,parameter2]...);                            |
|                   |                                                                       |
---------------------------------------------------------------------------------------------
|                   |                                                                       |
| SPL               | intrinsicname(parameter1[,parameter2]...);                            |
|                   |                                                                       |
---------------------------------------------------------------------------------------------

In order to provide consistency between calls from different programming
languages, the following rules apply to all parameters:

 *  Parameters are passed by reference; this means that a literal value
    cannot be used as a parameter.  The exception is VSETLANG, which has
    one parameter that is passed by value.

 *  No condition codes are returned; the status of the call is returned
    in a status word included as part of the comarea parameter specified
    in every intrinsic call.

 *  Return type intrinsics are not allowed; any values returned by the
    intrinsic are sent to the comarea or to a passed parameter.

Parameter Types 

The data types that are used in VPLUS/V intrinsics are shown in Table
6-3.  Note that not all types are allowed for all languages.

          Table 6-3.  Data Types Used for Various Languages 

-----------------------------------------------------------------------------------------------------
|              |                |                |                |                |                |
|  Data Type   |     COBOL      |    FORTRAN     |     BASIC      |     PASCAL     |      SPL       |
|              |                |                |                |                |                |
-----------------------------------------------------------------------------------------------------
|              |                |                |                |                |                |
| Character    | DISPLAY PIC    | Character      | String         | Packed Array   | Byte Array     |
|              | X(n)           |                |                | of Char        |                |
|              |                |                |                |                |                |
-----------------------------------------------------------------------------------------------------
|              |                |                |                |                |                |
| Two-byte     | COMP PIC S9    | Integer*2      | Integer        | Subrange       | Integer        |
| Integer      | thru PIC S9(4) |                |                | -32768..       |                |
|              |                |                |                | 32767          |                |
|              |                |                |                |                |                |
-----------------------------------------------------------------------------------------------------
|              |                |                |                |                |                |
| Unsigned     | COMP PIC 9     | Logical        | Integer (with  | Subrange       | Logical        |
| Two-byte     | thru PIC 9(4)  |                | value <32767)  | -32768..32767  |                |
| Integer      |                |                |                |                |                |
|              |                |                |                |                |                |
-----------------------------------------------------------------------------------------------------
|              |                |                |                |                |                |
| Four-byte    | COMP PIC S9(5) | Integer*4      | Integer        | Integer        | Double         |
| Integer      | thru PIC S9(9) |                | Integer1        |                |                |
|              |                |                |                |                |                |
-----------------------------------------------------------------------------------------------------
|              |                |                |                |                |                |
| Real         | --             | Real           | Real           | Real           | Real           |
| Four-byte    |                |                |                |                |                |
|              |                |                |                |                |                |
-----------------------------------------------------------------------------------------------------
|              |                |                |                |                |                |
| Long 8-byte  | --             | Double         | Long           | Longreal       | Long           |
|              |                | Precision      |                |                |                |
|              |                |                |                |                |                |
-----------------------------------------------------------------------------------------------------

1 In BASIC, a double integer can be represented by two consecutive
integers:

 *  the first contains the high-order digits of values above 32767 or is
    zero,

 *  the second contains the low-order digits of values above 32767 or the
    entire value up to 32767.

The VPLUS/V parameters use only data types that are available in all
programming languages:  character, integer, logical, and double integer.
The only exceptions are the transfer and conversion intrinsics, VPUTtype
and VGETtype, which use real and long.

Each parameter is described according to its generic type (character,
integer, logical, or double integer).  This table is provided for those
languages that do not call their data types by these particular names.
For example, if you are coding in COBOL and a parameter is specified as
logical, you can determine from this table that it is an unsigned
computational item that uses from one to four digits.



MPE/iX 5.0 Documentation