extern "FORTRAN"
{ void cfort (int *&);; }
#include <stdio.h>
main()
{
int i, *temp;
i=5;
temp=&i;
cfort(temp);
printf
("Updated integer value in C: %d\n", i);
}
|
SUBROUTINE CFORT ( ARG )
POINTER*4 (ARG, Y)
INTEGER*4 Y
PRINT *,
1 'FORTRAN INTEGER ARG VALUE:', Y
Y = Y + 1
END
|