Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 (Tek) 9/12/84; site tektronix.UUCP Path: utzoo!linus!decvax!tektronix!joels From: joels@tektronix.UUCP (Joel Swank) Newsgroups: net.unix,net.lang.f77 Subject: Re: Re: C calls FORTRAN subroutine Message-ID: <4020@tektronix.UUCP> Date: Wed, 31-Oct-84 15:23:29 EST Article-I.D.: tektroni.4020 Posted: Wed Oct 31 15:23:29 1984 Date-Received: Fri, 2-Nov-84 05:48:54 EST References: <249@imsvax.UUCP> <1206@hao.UUCP> <293@masscomp.UUCP> Organization: Tektronix, Beaverton OR Lines: 29 > Regarding the fellow who calls a FORTRAN subroutine from his C > program and is then unable to do I/O from within the FORTRAN > subroutine: > > The problem here is that the FORTRAN start-up code maps logical > unit numbers to Unix(tm) file descriptors in an implementation > dependent way. Since the main program is in C, none of this > setup gets done. Thus when the FORTRAN I/O library call is > executed, it can't find a valid logical unit number table, > and the output (if any) is trashed. I'd be amazed if the fellow > gets any output at all. > > A solution? Unless you have the compiler code to look at, I'm > afraid it's like the old joke: > I had this problem under 4.2bsd and I found that output was going to a file called fort.6. I circumvented the problem using a symbolic link: ln -s /dev/tty fort.6 Just execute this command before running the program, and output will go to the terminal. Joel Swank Software Center Tools Support 50-487 Tektronix Beaverton OR 97077 (503) 627-4403