Re: writing output listing onto screen (or not) and onto file
- From: "Terry" <tbwright@xxxxxxxxx>
- Date: 17 Jul 2006 18:19:50 -0700
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
.
- Follow-Ups:
- Re: writing output listing onto screen (or not) and onto file
- From: Richard Maine
- Re: writing output listing onto screen (or not) and onto file
- References:
- writing output listing onto screen (or not) and onto file
- From: Bernard Bru
- Re: writing output listing onto screen (or not) and onto file
- From: Tim Prince
- Re: writing output listing onto screen (or not) and onto file
- From: bru
- Re: writing output listing onto screen (or not) and onto file
- From: jwm
- Re: writing output listing onto screen (or not) and onto file
- From: bru
- writing output listing onto screen (or not) and onto file
- Prev by Date: Re: double confusion
- Next by Date: Re: recl on g95 and gfortran
- Previous by thread: Re: writing output listing onto screen (or not) and onto file
- Next by thread: Re: writing output listing onto screen (or not) and onto file
- Index(es):