comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Pageless Text_IO
Date: 1999/11/17
Date: 1999-11-17T00:00:00+00:00	[thread overview]
Message-ID: <80vdq2$kld$1@nnrp1.deja.com> (raw)
In-Reply-To: 3831d7ed@excalibur.GBM

In article <3831d7ed@excalibur.GBM>,
  "John Herro" <john@prousa.net> wrote:
> I've done it, but it's slow and
> crude, and it works only on some systems.  (E.g., it works
> with DOS, but not with VAX/VMS.)

> You can instantiate Sequential_IO for Character, and write
> your own version of Get_Line.

This is not just OS dependent, but compiler dependent, there
is no guarantee that sequential_IO on character will work
this way. For example in Ada 83, it would be quite legitimate
for it to raise an error for a character greater than 127, and
in either Ada 83 or Ada 95, it would be legitimate to have
control information at the start of the file, or even for
every record.

> This enables you to handle special
> characters, like Form Feeds, the same way you handle other
characters.  Of
> course, it's up to you if you want to keep line and page
counts.

In practice you can also do this special kind of programming
with Text_IO if you are careful.

However, the proper way to roll your own is with stream IO
in Ada 95, not sequential IO, and this has the advantage that
it intermixes with Text_IO very smoothly.



> - John Herro
> You can download a shareware AdaTutor program at
> http://members.aol.com/AdaTutor
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.




  reply	other threads:[~1999-11-17  0:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-16  0:00 Pageless Text_IO David Starner
1999-11-16  0:00 ` DuckE
1999-11-17  0:00   ` Wes Groleau
1999-11-17  0:00   ` Robert Dewar
1999-11-16  0:00 ` Robert Dewar
1999-11-16  0:00   ` David Starner
1999-11-16  0:00     ` Robert Dewar
1999-11-16  0:00       ` Arthur Evans Jr
1999-11-17  0:00         ` Robert Dewar
1999-11-16  0:00 ` Robert Dewar
1999-11-16  0:00   ` Robert Dewar
1999-11-16  0:00     ` John Herro
1999-11-17  0:00       ` Robert Dewar [this message]
1999-11-17  0:00     ` Wes Groleau
1999-11-19  0:00       ` Robert Dewar
1999-11-24  0:00         ` Wes Groleau
1999-11-25  0:00           ` Robert Dewar
1999-11-16  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