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 C++ usage Fortran subroutine
extern "FORTRAN"
{ void cfort(char [10], char [10]); }
#include <stdio.h>
main()
{
  char x[10] = "1234567890";
  char y[10];
  cfort(x,y);
  printf
    ("Value returned to C: %10.10s\n", y);
}
SUBROUTINE CFORT ( ARG1, ARG2 )
CHARACTER*10 ARG1, ARG2
PRINT *, 'FORTRAN ARG1 VALUE: ', ARG1
ARG2 = ARG1
END

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014