Re: WRITE + new line
- From: Dan Nagle <dannagle@xxxxxxxxxxx>
- Date: Tue, 15 Nov 2005 17:27:28 GMT
Hello,
glen herrmannsfeldt wrote:
Dan Nagle wrote:
<snip>
Actually, no. List-directed formatting, as indicated by the second * in the write statement, allows the processor to start new lines at will. Richard has explained this very well earlier in this thread.
It should still start a new line for each row.
I don't see, off hand, where in 10.9.2 this is required. I may have missed it, I suppose, but it's not that large a section. Most of the discussion there concerns allowed formats and separators. Usually, transfers are processed in term of effective list items. In this case, the effective list item is the array element, IIRC.
And I admit I haven't checked a lot of compiler to see what the usual practice is.
It may start a new line in other places, too. I would be pretty surprised if it started a new
line for each element, though maybe for COMPLEX*32 I wouldn't be so
surprised. In any case, yes, it is allowed to do that.
Well, OK, but the OP asked
Martin Glaser wrote:
Hi,
I want to write an 2-dimensional array to a textfile, but WRITE always uses a new line. How can you stop that?
which I take to mean that he has too many new lines, not a shortage.
In any case, Robin's answer was, at best, incomplete. Yet it was offered in his usual highly-confident tone.
I still think Richard gave the most complete answer. And a reading of section 10.9.2 on list-directed output is the authoritative source.
But sometimes the "standards-hat" is a bit tight, and I try to provide advice which is highly portable. "Just happening" to work on one or a few compiler(s) is not always guaranteed to be helpful with the next compiler.
-- Cheers!
Dan Nagle Purple Sage Computing Solutions, Inc. .
- Follow-Ups:
- Re: WRITE + new line
- From: James Giles
- Re: WRITE + new line
- From: Richard E Maine
- Re: WRITE + new line
- References:
- WRITE + new line
- From: Martin Glaser
- Re: WRITE + new line
- From: robin
- Re: WRITE + new line
- From: Dan Nagle
- Re: WRITE + new line
- From: glen herrmannsfeldt
- WRITE + new line
- Prev by Date: write a main program into a subroutine
- Next by Date: Re: write a main program into a subroutine
- Previous by thread: Re: WRITE + new line
- Next by thread: Re: WRITE + new line
- Index(es):
Relevant Pages
|
|