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


Array

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

Sample Fortran usage C++ function
REAL*4 MATRIX(3) / 1.0, 2.0, 3.0 /
CALL CENTRY(MATRIX)
PRINT *,
1  'UPDATED VALUES IN FORTRAN:', MATRIX
END
extern "FORTRAN"
{ void centry(float [3]); }
#include <stdio.h>
void centry(float x[3])
{
  int index;
  printf
    ("C arg values: %f %f %f\n",
    x[0], x[1], x[2]);
  for (index = 0; index <= 2; index++)
  x[index] -= 1.0F;
}

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014