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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,29f36805b9a20fe8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-31 12:50:03 PST Path: supernews.google.com!sn-xit-03!supernews.com!cyclone-sf.pbi.net!63.208.208.143!feed2.onemain.com!feed1.onemain.com!news-out.cwix.com!newsfeed.cwix.com!wn2feed!worldnet.att.net!135.173.83.71!wnfilter1!worldnet-localpost!bgtnsc06-news.ops.worldnet.att.net.POSTED!not-for-mail Message-ID: <3AC64324.A79AE084@worldnet.att.net> From: James Rogers X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Streams in Ada References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sat, 31 Mar 2001 20:48:35 GMT NNTP-Posting-Host: 12.74.128.189 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc06-news.ops.worldnet.att.net 986071715 12.74.128.189 (Sat, 31 Mar 2001 20:48:35 GMT) NNTP-Posting-Date: Sat, 31 Mar 2001 20:48:35 GMT Organization: AT&T Worldnet Xref: supernews.google.com comp.lang.ada:6296 Date: 2001-03-31T20:48:35+00:00 List-Id: I assume from your use of the term "streams" that you want to be able to directly address file elements. "Streams" is the C term for such capability. Ada uses streams for a somewhat different capability. I believe what you want is handled by the package Ada.Direct_Io. Look in the Ada Reference Manual, Appendix A, for details on this package. Jim Rogers Colorado Springs, Colorado USA "chris.danx" wrote: > > Hi, > I've looked about for examples on streams in Ada. I'm writing an > virtual file system as a file on disk, and want to use streams. I have to > be able to go back and forwards and read large blocks of data from the file > at random positions. I have tried to locate an example of using streams but > couldn't find any that didn't deal with sequential access. > > the first block is 512 bytes and inodes are 64bytes. then i have a set of > blocks which are 16bytes long. you can see now why i'm using streams, but i > can't seem to work out from the ref manual and Barnes what i should do. I > recall the ref manual saying index is relative to stream element but i don't > know what it means. Anyone know of a good example? > > Thanks in advance, > Chris Campbell