Fortran Main with C I/O

Kurt Hirchert hirchert at harriett.ncsa.uiuc.edu
Tue Oct 2 01:52:17 AEST 1990


In article <1990Sep21.132232.11305 at DRD.Com> mike at DRD.Com (Mike Rovak) writes:
>bill%biomel at cs.dal.ca wrote:
>} This would be an absolute disaster.  We use C I/O extensively for things
>} like graphics, raw input, and to do things like display a file directory
>} when asking the user to input a data file name.  If true, someone had
>} better come up with a fix awfully fast!
>
>Not a problem, guys.  Make a C main function whose sole purpose is to call
>the Fortran routine.  Change the word "PROGRAM" in each Fortran routine
>to "SUBROUTINE" and your job is done.

This "solution" works only if you are willing to give up using Fortran I/O.
There are a number of people who want to be able to use _both_ Fortran I/O
and C I/O.  (In the future, similar issues may apply to error handling and
memory management.)
--
Kurt W. Hirchert     hirchert at ncsa.uiuc.edu
National Center for Supercomputing Applications



More information about the Comp.lang.c mailing list