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


Fixed-length character data

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

Sample Fortran usage C++ function (by Reference)
CHARACTER*10 X, Y
X = '1234567890'
CALL CENTRY(X, Y)
PRINT *,
1  'VALUE RETURNED TO FORTRAN: ', Y
END
extern "FORTRAN"
{ void centry(char [10],
char [10]); }
#include <stdio.h>
#include <string.h>
void centry(char x[10],
  char y[10])
{
  printf
    ("C char array arg: %10.10s\n",x);
  memcpy(y, x, 10);
}

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014