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


Short floating-point number

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

Sample C++ usage (by Reference) Fortran function
extern "FORTRAN"
{ float cfort( float & ); }
#include <stdio.h>
main()
{
  float x, y;
  x=5.0F;
  y = cfort(x);
  printf
    ("Value returned to C: %f\n", y);
}
FUNCTION CFORT ( ARG )
REAL*4 CFORT
REAL*4 ARG
PRINT *, 'FORTRAN ARG VALUE:', ARG
CFORT = ARG
END

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014