Output to both console output and file

Output to both console output and file

Is there a way to write to both the console output and to the file (or to two different units) at the same time? I would like to avoid duplicate write statements.

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I posted a similar question several months ago, but never got a response (or maybe the answer was "no"). Anyway, if somebody comes up with something could you let me know in case I miss it. I have the same problem.

In the mean time, I can show you what I do for what it's worth. (Probably not much)

I'm assuming unit 0 is the console and unit 1 is connected to a file.

DO I=0,1

Sorry, I don't have anything snazzier than that.



I don't know of any way to do this automatically.


Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today