1 /* rev.c == rev.C */ /* anonymous ftp@zebra.desy.de */ 2 /* An example from cfortran.h package. Requires rev_f.f */ 3 /* Burkhard Burow burow@desy.de 1990 - 1997. */ 4 5 #include <stdio.h> 6 #include <stdlib.h> /* EXIT_SUCCESS */ 7 #ifndef EXIT_SUCCESS 8 #define EXIT_SUCCESS 0 9 #endif 10 #include "cfortran.h" 11 12 PROTOCCALLSFFUN1(INT,FREV,frev,INTV)13 PROTOCCALLSFFUN1(INT,FREV,frev, INTV) 14 #define FREV(A1) CCALLSFFUN1( FREV,frev, INTV, A1) 15 PROTOCCALLSFSUB1(REV,rev, INTV) 16 #define REV(A1) CCALLSFSUB1(REV,rev, INTV, A1) 17 18 main() { 19 static int a[] = {1,2}; 20 printf("REV(a[0,1]=%d,%d) receives:",a[0],a[1]); 21 REV(a); printf("a[0,1]=%d,%d\n",a[0],a[1]); 22 printf("FREV(a[0,1]=%d,%d) receives:",a[0],a[1]); 23 printf("%d",FREV(a)); printf(" with a[0,1]=%d,%d\n",a[0],a[1]); 24 return EXIT_SUCCESS; 25 } 26