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