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


16-bit signed binary integer

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

Sample C++ usage PL/I subroutine
#include <stdio.h>

extern "PLI" {
  short int cpli( short int * );
}

main() {
  short int x, y;
  x=5;
  y = cpli(&x);  /* by reference */
}
 
CPLI: PROC(ARG) RETURNS (FIXED BIN(15));
    DCL ARG FIXED BIN (15);
⋮
    RETURN (ARG);
    END;
 
Note: Because short int is an example of a parameter which must be passed using an C++ explicit pointer, you cannot code y = cpli(x), passing x by value.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014