Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!usc!orion.oac.uci.edu!ucivax!ucla-cs!ucla-seas!edison!hdai From: hdai@edison.seas.ucla.edu (HongXing Dai/;093090;eegrad) Newsgroups: comp.windows.ms Subject: MS Fortran with SDK Keywords: Fortran file handler, SDK Message-ID: <1011@lee.SEAS.UCLA.EDU> Date: 30 Aug 90 18:39:53 GMT Sender: news@SEAS.UCLA.EDU Organization: SEASnet, University of California, Los Angeles Lines: 15 Help.... I am using Windows 3.0 with SDK 3.0, MS Fortran 5.0, and MS C 6.0 to transport a Fortran program into Windows environment. The problem I have now is how to map the file handler from OpenFile (or just open from C) to Fortran file unit so I can do I/O from Fortran. I tried to use OPEN and WRITE inside Fortran, it seemed to work (although it gave me 'Unrecoverable error' when the program exited), but I could not READ anything inside Fortran! I noticed that whenever I used OPEN within Fortran, it used a file handler which is *not* the file unit I specified in Fortran. The Fortran program I am using is too big to translate into C or change all the WRITE, READ, and FORMAT into corresponding C or Windows routines. One of our Mac programmer could easily use MacFortran to open a file and do I/O, I wonder if there is a similar mechanism available in Windows SDK? Shinn