Fortran Main with C I/O

Mike Rovak mike at DRD.Com
Tue Oct 2 10:33:08 AEST 1990


hirchert at harriett.ncsa.uiuc.edu (Kurt Hirchert) wrote:
} 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.)


We have a suite of applications which uses a C main function and which 
allows both C and Fortran I/O.  The two platforms we run this application
on are (forgive me) MSDOS PC's, and a SUN (I'm so insulated from it I don't
even know what it is - I think it's a SPARC).

Since my experience in mixed languages is limited to these two platforms,
I assumed that other platforms would also allow this to occur.  This is
why my original posting was so full of enthusiasm.  I stand corrected.

------------------------------------------------------------------------
Disclaimer: My opinions do not necessarily reflect those of my employer.
========================================================================
------------------------------------------------------------------------
     mike at DRD.Com  
     uunet!apctrc!drd!mike
========================================================================



More information about the Comp.lang.c mailing list