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



Just define an interger*4 variable IOUNIT and set it to 0 for screen
output, or 2 (say) for printer or anything from 6 up (wiser) for a disk
device file..
The only problem is that screen i/o historically required a leading
space or other "carriage control" character as a prefix in the format
statement to avoid odd things happening, especially in earlier
compilers.
..
So you can work around the problem this way (one of many) by adding a
space only on screen i/o before any i/o to file IOUNIT..
IF (iounit.eq.0) THEN
write (0,701)
701 format(1X,\)
ENDIF

Terence Wright

.