POINTER*4 (P, I)
INTEGER*4 I(3)
INTEGER*4 J(3) / 1, 2, 3 /
P = LOC(J)
CALL CENTRY (P)
PRINT *,
1 'UPDATED VALUES IN FORTRAN:', I
END
|
extern "FORTRAN"
{ void centry(int (**)[3]); }
#include <stdio.h>
void centry(int (**x)[3])
{
int index;
printf
("C int array arg values:
%d %d %d\n",
(**x)[0], (**x)[1], (**x)[2]);
for (index = 0; index <= 2; index++)
(**x)[index] -= 1;
}
|