public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: "Tim Prince" <tprince@computer.org>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: fortran/4885: BACKSPACE example that doesn't work as of  gcc/g77-3.0.x
Date: Mon, 05 Nov 2001 16:27:00 -0000	[thread overview]
Message-ID: <20011116213600.3133.qmail@sourceware.cygnus.com> (raw)

The following reply was made to PR fortran/4885; it has been noted by GNATS.

From: "Tim Prince" <tprince@computer.org>
To: "Toon Moene" <toon@moene.indiv.nluug.nl>,
	"Youngjean Jung" <yjjung@newton.berkeley.edu>
Cc: <gcc-gnats@gcc.gnu.org>
Subject: Re: fortran/4885: BACKSPACE example that doesn't work as of  gcc/g77-3.0.x
Date: Fri, 16 Nov 2001 13:30:41 -0800

 I'll buy both of you a beer if we ever meet, if we can check 6 Fortran
 compilers without finding one which fails to implement this part of the
 standard correctly.  But, it makes sense, in a way, and it seems g77 is
 following it.  Even in a relatively simply language like g77, we have many
 non-conformant applications which just happen to have worked for quite a
 while, and even relative experts in the language don't always have the
 answer.
 ----- Original Message -----
 From: "Toon Moene" <toon@moene.indiv.nluug.nl>
 To: "Youngjean Jung" <yjjung@newton.berkeley.edu>
 Cc: "Tim Prince" <tprince@computer.org>; <gcc-gnats@gcc.gnu.org>
 Sent: Friday, November 16, 2001 12:31 PM
 Subject: Re: fortran/4885: BACKSPACE example that doesn't work as of
 gcc/g77-3.0.x
 
 
 > Youngjean Jung wrote:
 >
 > > I conducted many tests on the Endfile, Backspace commands. They don't
 > > work in the following senses:
 > >
 > > 1) Endfile command writes meaningless letters on the data file.
 > > 2) Endfile, Backspace combination doesn't make a 'backspace job'.
 >
 > >       program test
 > > c
 > >       implicit none
 > >       integer  i,k
 > > c
 > >       do i=1,10
 > >         open(1,file='s2.dat',status='unknown',access='sequential')
 > >         do k=10,20
 > >            write(1,*) i,k
 > >            endfile 1
 > >            backspace 1
 > >         end do
 > >         close(1)
 > >       end do
 > > c
 > >       end
 >
 > Hmmm, I get the same s2.dat as you get (Debian GNU/Linux 2.2,
 > gcc/g77-3.0.2):
 >
 > toon@laptop:~/g77-bugs$ cat s2.dat
 >  10 10
 >  10 11
 >  10 12
 >  10 13
 >  10 14
 >  10 15
 >  10 16
 >  10 17
 >  10 18
 >  10 19
 >  10 20
 >
 > This seems to be in accordance with the Standard:
 >
 > 12.10.4.1 BACKSPACE Statement.
 >
 > Execution of a BACKSPACE statement causes the file connected to the
 > specified unit to be positioned before the preceding record. If there is
 > no preceding record, the position of the file is not changed. Note that
 > if the preceding record is an endfile record, the file becomes
 > positioned before the endfile record.
 >
 > In other words, your backspace only backspaces over the endfile record
 > (as per the standard).  If you want to backspace over the record you
 > just wrote, you have to backspace twice.
 >
 > [Tim - does this mean I can close fortran/4885 ?  Thanks]
 >
 > --
 > Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
 > Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
 > Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
 > Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)
 


             reply	other threads:[~2001-11-16 21:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-05 16:27 Tim Prince [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-12-03 15:56 toon
2001-12-03 15:54 toon
2001-11-08 19:26 Toon Moene
2001-11-06  4:46 Youngjean Jung
2001-11-05 15:39 Youngjean Jung
2001-11-05 15:08 Youngjean Jung
2001-11-05 14:11 Toon Moene
2001-11-05 14:01 Youngjean Jung
2001-11-05  2:47 Youngjean Jung
2001-11-05  2:46 Tim Prince
2001-11-05  2:45 Youngjean Jung
2001-11-05  2:28 Tim Prince
2001-11-04 10:56 toon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011116213600.3133.qmail@sourceware.cygnus.com \
    --to=tprince@computer.org \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).