0

I have a complicated Fortran subroutine, which takes the (integer) file handle for a logfile (assumed to be opened and closed outside of the subroutine) as one of its inputs. The subroutine runs a process and writes a bunch of statistics to the logfile via WRITE(logfile, ... ) commands.

Is there an easy way to call this subroutine such that, instead of writing to a file, it just writes to the standard out?

The basic solution would be to find-and-replace all instances of logfile inside write commands with *, but there are a ton of files and subroutines here and I think it would be better if I could just pass something else in logfiles place. However, since the subroutine requires that the file handle logfile is an integer, and * is not an integer, I am not sure if this is even possible.

Zim
  • 101
  • 3

0 Answers0