Xref: utzoo comp.lang.c:32472 comp.lang.fortran:3876 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!apctrc!drd!mike From: mike@DRD.Com (Mike Rovak) Newsgroups: comp.lang.c,comp.lang.fortran Subject: Re: Fortran Main with C I/O Keywords: sorry, tunnel vision Message-ID: <1990Oct2.003308.10429@DRD.Com> Date: 2 Oct 90 00:33:08 GMT References: <1990Sep20.221007.8515@cs.dal.ca> <1990Sep21.132232.11305@DRD.Com> <1990Oct1.155217.24452@ux1.cso.uiuc.edu> Distribution: usa Organization: DRD Corporation Lines: 34 hirchert@harriett.ncsa.uiuc.edu (Kurt Hirchert) wrote: } In article <1990Sep21.132232.11305@DRD.Com> mike@DRD.Com (Mike Rovak) writes: } >bill%biomel@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@DRD.Com uunet!apctrc!drd!mike ========================================================================