comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@spectre.mitre.org (Robert I. Eachus)
Subject: Re: simple problem?
Date: 1996/05/10
Date: 1996-05-10T00:00:00+00:00	[thread overview]
Message-ID: <EACHUS.96May10162546@spectre.mitre.org> (raw)
In-Reply-To: Pine.SGI.3.91.960509195810.8410A-100000@sgi17.york.ac.uk



   John gave a very nice answer to this question, however he also said:

  >	Now, I suspect that you'll want to be able to append to the hoax file
  > later.  The best solution is to get an Ada95 compiler.  You would still
  > use Text_IO, but you would Open the hoax file in Append_File mode, which
  > isn't available in Ada83.  If you're stuck with an Ada83 compiler, the
  > best way to "append" to a text file with variable-length records is, at
  > the start of the program, to read the entire file a line at a time and
  > write each line to a new file.  When you get to the end of the input file,
  > close it, but leave the output file open for further writing.  At the end
  > of your program, delete the input file and rename the output file.  (The
  > Ada95 solution is easier!)

   Ada 83 does not prohibit opening a Text_IO file for appending.  In
fact it provides a mechanism, the Form string, for requesting append
mode.  Many Ada 83 compilers support this.  Unfortunately, the
appropriate Form string is implementation defined, so check your
vendor supplied appendix F.

    (Sorry to waste your time discussing obsolete languages. ;-)
--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...




  parent reply	other threads:[~1996-05-10  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-05-09  0:00 simple problem? Frank Cheung
1996-05-10  0:00 ` John Herro
1996-05-10  0:00 ` Robert I. Eachus [this message]
1996-05-10  0:00   ` Kevin D. Heatwole
1996-05-10  0:00 ` John English
1996-05-10  0:00   ` Robert A Duff
1996-05-13  0:00     ` John English
1996-05-13  0:00       ` Robert A Duff
1996-05-14  0:00       ` Keith Thompson
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox