From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c96efb67e4b1a2c5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-12-16 12:58:05 PST Path: nntp.gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!rutgers!sgigate.sgi.com!sgiblab!spool.mu.edu!howland.reston.ans.net!gatech!bloom-beacon.mit.edu!world!blanket.mitre.org!linus.mitre.org!linus!mbunix!eachus From: eachus@spectre.mitre.org (Robert I. Eachus) Newsgroups: comp.lang.ada Subject: Re: How does the Ada 95 Streams package Index? Date: 16 Dec 94 12:58:05 Organization: The Mitre Corp., Bedford, MA. Distribution: world Message-ID: References: <3cra2n$rio@ixnews1.ix.netcom.com> NNTP-Posting-Host: spectre.mitre.org In-reply-to: halloran@ix.netcom.com's message of 16 Dec 1994 05:54:31 GMT Date: 1994-12-16T12:58:05+00:00 List-Id: 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...