C calls FORTRAN subroutine
Joel Swank
joels at tektronix.UUCP
Thu Nov 1 06:23:29 AEST 1984
> 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
More information about the Comp.unix
mailing list