From: eachus@spectre.mitre.org (Robert I. Eachus)
Subject: Re: End_Of_Line, End_Of_File
Date: 1996/12/10
Date: 1996-12-10T00:00:00+00:00 [thread overview]
Message-ID: <EACHUS.96Dec9201101@spectre.mitre.org> (raw)
In-Reply-To: dewar.849368006@merv
In article <dewar.849368006@merv> dewar@merv.cs.nyu.edu (Robert Dewar) writes:
> Well GNAT is doing exactly what the Ada 95 reference manual
> requires. What you are really discovering is that Text_IO is not
> an easy tool for this sort of programming. I recommend you use
> Stream_IO instead, then you know exactly what you are reading.
True. However, if you need to be using Text_IO for other reasons.
End_of_File is true if the next thing in the logical file is an end
of file, or if there is a (logical again, not physical) sequence of end
of line, end of page, end of file. If you read past the (virtual) line
terrminator at the end of the file, then you have also read past an
end of page, so the line number is now 1.
It really is tricky to implement this on a system so that there are
no "junk" characters in a file, and it is even tougher to copy a file
using just Text_IO, but it can be done.
--
Robert I. Eachus
with Standard_Disclaimer;
use Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...
next prev parent reply other threads:[~1996-12-10 0:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-11-30 0:00 End_Of_Line, End_Of_File Fernando Tricas
1996-11-30 0:00 ` Robert Dewar
1996-12-02 0:00 ` Fernando Tricas
1996-12-02 0:00 ` Robert Dewar
1996-12-10 0:00 ` Robert I. Eachus [this message]
1996-12-02 0:00 ` Peter Amey
1996-12-02 0:00 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox