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


Long floating-point number

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

Sample Fortran usage (by Value) C++ function (by Value)
REAL*8 X, Y, CENTRY
X = 12.5D0
Y = CENTRY((X))
PRINT *,
1  'VALUE RETURNED TO FORTRAN:', Y
END
extern "FORTRAN"
{ double centry(double); }
#include <stdio.h>
double centry(double x)
{
  printf("C arg value: %f\n",x);
  return(x);
}
Sample Fortran usage C++ function (by Reference)
REAL*8 X, Y, CENTRY
X = 5.0D0
Y = CENTRY(X)
PRINT *,
1  'VALUE RETURNED TO FORTRAN:', Y
END
extern "FORTRAN"
{ double centry(double &); }
#include <stdio.h>
double centry(double &x)
{
  printf("C double arg value: %f\n",x);
  return(*x);
}

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014