comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: I/O streaming with custom data transport
Date: Wed, 22 Nov 2006 17:06:22 +0100
Date: 2006-11-22T17:06:14+01:00	[thread overview]
Message-ID: <107bu427lcns8.1l53eg0wxar4q.dlg@40tude.net> (raw)
In-Reply-To: ek19dl$moq$1@cernne03.cern.ch

On Wed, 22 Nov 2006 11:39:48 +0100, Maciej Sobczak wrote:

> Another issue - what about the text formatting? The standard Put(...) 
> procedures are quite powerful, is there any way to reuse them (or at 
> least their logic) with custom streams?

?

Stream-oriented I/O is unformatted per concept of. It is a stream of
elements, not even characters. Formatted I/O is when there are some things
beyond characters, like lines, columns, pages etc.

For formatted buffered I/O use strings. As a block/record/line use String.
You can find an example of string formatting library here:

   http://www.dmitry-kazakov.de/ada/strings_edit.htm

For physical I/O, which is a separate issue, you can still use streams,
files, sockets, whatsoever. Just define a primitive operation Write_Line on
the abstract type of the "recipient," which takes String argument. For all
further types of objects use that primitive operation.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2006-11-22 16:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-21 15:11 I/O streaming with custom data transport Maciej Sobczak
2006-11-21 15:28 ` gautier_niouzes
2006-11-21 17:51 ` Alex R. Mosteo
2006-11-22  9:16   ` Maciej Sobczak
2006-11-22 10:01     ` Alex R. Mosteo
2006-11-22 10:39       ` Maciej Sobczak
2006-11-22 16:06         ` Dmitry A. Kazakov [this message]
2006-11-22 16:30         ` Alex R. Mosteo
2006-11-23  5:48         ` Simon Wright
2006-11-22 13:50     ` Robert A Duff
2006-11-22 14:37       ` Maciej Sobczak
2006-11-22 16:11         ` Georg Bauhaus
2006-11-21 19:02 ` Dmitry A. Kazakov
2006-11-22  9:21   ` Maciej Sobczak
2006-11-22 10:31     ` Dmitry A. Kazakov
replies disabled

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