z/OS Language Environment Writing Interlanguage Communication Applications
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Supported data types passed using C++ pointers (by reference)

z/OS Language Environment Writing Interlanguage Communication Applications
SA38-0684-00

Table 1 identifies the data types that can be passed as parameters between C++ and PL/I applications with the use of explicit pointers under C++. Parameters that are pointers are passed by reference to PL/I. Conversely, reference parameters passed by PL/I to C++ are received as pointers to the equivalent data type or as a C++ reference variable such as int& i.

Anything that is passed with a pointer can be passed with a reference variable; the effect is the same. Reference variables are generally easier to use.

Table 1. Supported data types between C++ and PL/I using C++ pointers (by reference)
C++ PL/I
signed short int REAL FIXED BINARY(15,0)
signed int REAL FIXED BINARY(31,0)
signed long int REAL FIXED BINARY(31,0)
float FLOAT DECIMAL(06)

FLOAT BINARY (21) is the preferred equivalent for float.

double FLOAT DECIMAL(16)

FLOAT BINARY (53) is the preferred equivalent for double.

long double FLOAT DECIMAL(33)

FLOAT BINARY (109) is the preferred equivalent for long double.

pointer to . . . POINTER
Note: Data storage alignment must match.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014