comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@spectre.mitre.org (Robert I. Eachus)
Subject: Re: How does the Ada 95 Streams package Index?
Date: 16 Dec 94 12:58:05
Date: 1994-12-16T12:58:05+00:00	[thread overview]
Message-ID: <EACHUS.94Dec16125805@spectre.mitre.org> (raw)
In-Reply-To: halloran@ix.netcom.com's message of 16 Dec 1994 05:54:31 GMT

In article <3cra2n$rio@ixnews1.ix.netcom.com> halloran@ix.netcom.com (Timothy Halloran) writes:

 > From examining the Ada 95 reference manual I get the impression that
 > a file created with the streams package is able to move to numbered
 > records in the file (e.g. Read the 5th record).  How is this intended
 > to be implemented in light of the variable length of the records which
 > could be in the file?  Are all the records expanded to the largest size
 > or are divider bytes inserted in the file.

   I think that you are jumping to conclusions.  The RM refers to
indexes and positions, but explicitly does not say what size the
elements measured are.  However I expect that all implementations will
use bytes as stream elements, with a (very) few machines still using
9-bit instead of 8-bit bytes.  So no, no divider bytes are expected to
be inserted, and each value written is expected to occupy the smallest
possible number of stream elements.  When Gnat supports streams, I'll
probably write an IFF implementation on top of it, which is the
expected proper use.  (IFF files are self-describing heterogenous
files.  Each section of an IFF file starts with a header containing a
32-bit identifier and a length field.)
--

					Robert I. Eachus

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



  reply	other threads:[~1994-12-16 12:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-12-16  5:54 How does the Ada 95 Streams package Index? Timothy Halloran
1994-12-16 12:58 ` Robert I. Eachus [this message]
1994-12-16 15:16 ` Robert Dewar
1994-12-17 14:05 ` Tucker Taft
replies disabled

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