From jkr@jkr.cc.rl.ac.uk  Thu Aug 24 14:51:09 2000
Received: from nameserv.rl.ac.uk (nameserv.rl.ac.uk [130.246.135.129])
	by dkuug.dk (8.9.2/8.9.2) with ESMTP id OAA19257
	for <SC22WG5@dkuug.dk>; Thu, 24 Aug 2000 14:51:09 +0200 (CEST)
	(envelope-from jkr@jkr.cc.rl.ac.uk)
Received: from jkr.cc.rl.ac.uk (jkr.cc.rl.ac.uk [130.246.8.20])
	by nameserv.rl.ac.uk (8.8.8/8.8.8) with ESMTP id NAA26893
	for <SC22WG5@dkuug.dk>; Thu, 24 Aug 2000 13:51:08 +0100
Received: (from jkr@localhost)
	by jkr.cc.rl.ac.uk (8.8.8+Sun/8.8.8) id NAA29379
	for SC22WG5@dkuug.dk; Thu, 24 Aug 2000 13:52:15 +0100 (BST)
Date: Thu, 24 Aug 2000 13:52:15 +0100 (BST)
From: John Reid <jkr@rl.ac.uk>
Message-Id: <200008241252.NAA29379@jkr.cc.rl.ac.uk>
To: SC22WG5@dkuug.dk
Subject: Interpretation 23
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"

We struck a problem at Oulu which I would like to air with you all.

Suppose a formatted sequential file is positioned in the middle of a
record because it has just performed a nonadvancing read or write
statement.  Suppose there are n characters from the current point to
the end of the record.  Now perform a write of less than n characters.
Is the length of the record unchanged and are the characters at the end
of the record retained?

At [136:44], we find: 

For sequential access on output, if there is a current record, the file
position is not changed and the current record becomes the last record
of the file.  Otherwise, a new record is created as the next record of
the file; this new record becomes the last and current record of the
file and the file is positioned at the beginning of this record.

This makes it clear that all records beyond the current record are lost,
but what about the data in the current record beyond the current point?
The Oulu subgroup thought that this was the intention and worked out an
edit to the above paragraph. Doubts were expressed in the main group. 

Another view is that the data should be retained since this paragraph 
does not say that it is lost. 

Should it make any difference whether the previous statement was a 
read or a write? 

I tried this program on the five compilers to which I have access

 program main
  character(4)word
  character(10)line
  integer size

  open(11)
  write(11,'(a)')'1234567890'
  rewind 11
  read(11,'(a)', advance='no')word
  write(11,'(a)', advance='yes')word
  rewind 11
  read(11,'(a)',advance='no',eor=10, size=size)line
10  write(*,*)' line=',line
  write(*,*)' size=',size

  rewind 11
  write(11,'(a,TL6)', advance='no')'1234567890'
  write(11,'(a)', advance='yes')word
  rewind 11
  read(11,'(a)',advance='no',eor=20, size=size)line
20  write(*,*)' line=',line
  write(*,*)' size=',size

 end program 

and the reported sizes were:

SUN      8  10
EPC      8  10
Nag      8  10
DEC     10  10
Fujitsu  8   8

What do you think?

John. 
