On May 13, 6:33 pm, nos...@[EMAIL PROTECTED]
(Richard Maine) wrote:
> <robert.corb...@[EMAIL PROTECTED]
> wrote:
>
> > I once interpreted the standard the way you do. My implementation
> > of the tab edit descriptors in Sun Fortran worked that way. After
> > discovering that other implementations did not work the way mine
> > did, I filed a request for interpretation against the Fortran 95
> > standard (interp. 000027). The committee ruled the other way.
>
> Huh? Do you have it backwards here? I don't see how the ruling could
> have been more clear. There is obviously a problem somewhere along here
> in communicating English - much less Fortran. I'm not saying whose
> "fault" the communication problem is (maybe even mine), but there is
> sure a failure somewhere.
>
> The question in interp 0027, cut&pasted directly from it, is
>
> When a file is positioned within a record at the start of sequential
> formatted I/O, where is the left tab limit (see Section 10.6.1.1)? Is
> it at the start of the record or at the point where the file
> was positioned at the start of execution of the statement?
>
> and the answer, in complete, was
>
> The left tab limit is the point where the file was positioned at the
> start of execution of the statement.
>
> and the discussion was
>
> This follows from the second sentence of 10.6.1.1, which states
> "Immediately prior to data transfer, the left tab limit becomes
> defined as the character position of the current record."
>
> This makes it pretty explicit to me that the left tab limit is *NOT*
> always at the start of the record, particularly insomuch as that was the
> other of the two choices - the one specifically rejected. Even if you
> somehow read the positive words differently, how can you possibly
> explain the interp rejecting the "is it at the start of the record"
> option? If anyone thought that these two phrases are equivalent, I'd
> have hoped that they would point that out as an apparent comtradiction
> in the question.
>
> > The Fortran 2003 standard is clearer. In Section 10.7.1.1, it
> > states
>
> > Immediately prior to nonchild data transfer, the left tab
> > limit becomes defined as the character position of the
> > current record or the character position of the stream file.
>
> > The character position of the current record is the position of
> > the start of the record, not the file position at the start of
> > the I/O statement.
>
> I'm sorry, but I 100% disagree. See the interp that you just referenced.
> It has the negation of your claim above, almost word-for-word.
It does look as if I got it wrong. Here is an example. Given
the program
PROGRAM MAIN
OPEN (10, FILE='XXX')
REWIND 10
WRITE (10, '(A)', ADVANCE='NO') 'ABCDEF'
WRITE (10, '(T1, A)') 'GHI'
END
is the output
ABCDEFGHI
or
GHIDEF
The way I implemented it in Sun Fortran, the output is
ABCDEFGHI
When I use ifort 8.0 (the last version to which I have access),
I get
GHIDEF
Do you agree that your reading of 95/000027 makes
ABCDEFGHI
the correct output?
Bob Corbett


|