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


Declaration for COBOL calling C++ (extern "C")

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

COBOL program C++ function
ID DIVISION.
PROGRAM-ID. COBPROG.
WORKING-STORAGE SECTION.
01 P1 PIC S9(9) USAGE IS BINARY.
PROCEDURE DIVISION.
CALL 'CPLUSF' USING BY VALUE P1.
GOBACK.
extern "C" {
  void CPLUSF( int p1 );
}
void CPLUSF( int parm ) {
  printf("parm=%d\n");
}

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014