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


Declaration for C++ calling PL/I

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

C++ function PL/I Routine
extern "PLI" {
double PLIFUNC( double );
    / C++ prototype /
}

int main() {
  double val,result;

  val=7.1;
  result=PLIFUNC(val);
  printf("val=%f, result=%f\n",
    val,result);
}
 
PLIFUNC: Proc(arg) options(reentrant)
    returns(float binary(53));
  Dcl arg float binary(53);
  Return (34.0);
  End;
 

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014