Re: writing output listing onto screen (or not) and onto file



Tim Prince wrote:
Bernard Bru wrote:

Is it possible to simplify my code by putting only one
WRITE statement when I want to write output results onto screen
(or not) and onto a file :

Are you asking about facilities provided by most systems for redirecting output sent to '*' (or, on many systems, unit 6 without an OPEN)?
For example, the tee program, or redirection using '>' on the command line?

Sorry, perhaps I'm not so clear:

Some time I want to have at the same time output on screen (Unit 6 or *)
and onto a file (OPEN(8,FILE= 'sosout')
An an other time I want only output on file (here unit 8) (for me it is easier to visualize the output using vim editor) So I put in this case
OPEN(6,FILE= 'NO') because I dont need it

It seems to me heavy to put in the code 2 WRITE's for each output!!!

WRITE(6,....................
WRITE(8, the same as above

Bernard Bru
.



Relevant Pages