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


Unsigned one-byte character data

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

Sample C usage (by Reference) Fortran subroutine
#pragma linkage (cfort,FORTRAN)
#include <stdio.h>
void cfort(unsigned char *,
    unsigned char *);
main()
{
  unsigned char x, y;
  x='a';
  cfort(&x,&y);
  printf
    ("Value returned to C: %c\n", y);
}

 
SUBROUTINE CFORT ( ARG1, ARG2 )
CHARACTER*1 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