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


Extended floating-point number

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

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

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014