test1main.c |
#include <stdio.h> main() { int i; double x; char c; i = 1; x = 1.23; c = 'A'; mysub_(&i, &x, &c); printf("i=%d, x=%f, c=%c\n", i, x, c); } |
test1sub.f |
subroutine mysub(i,x,c) integer i real*8 x character c write(*,*) i write(*,*) x write(*,*) c i = 234 x = 234.567 c = 'B' end |