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,def37ddb414578c9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-07 08:31:57 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!uni-erlangen.de!fu-berlin.de!uni-berlin.de!pc-62-31-50-169-cr.blueyonder.co.UK!not-for-mail From: nickroberts@blueyonder.co.uk (Nick Roberts) Newsgroups: comp.lang.ada Subject: Re: Diffrence between a sequential binairies file and direct binairies file Date: Sat, 07 Sep 2002 15:32:08 GMT Organization: AdaOS Message-ID: <3d7a1901.559077245@news.cis.dfn.de> References: NNTP-Posting-Host: pc-62-31-50-169-cr.blueyonder.co.uk (62.31.50.169) X-Trace: fu-berlin.de 1031412715 60437370 62.31.50.169 (16 [25716]) X-Newsreader: Forte Free Agent 1.21/32.243 Xref: archiver1.google.com comp.lang.ada:28780 Date: 2002-09-07T15:32:08+00:00 List-Id: On Sat, 7 Sep 2002 09:52:13 -0400, "Dominic D'Apice" strongly typed: >Hello all, > >Can someone can explain what is the main difference between a sequential >binairies file and direct binairies file ? > >Thank >Dominic Technically, the difference is that a sequential binary file is accessed sequentially, and a direct binary file is accessed directly. Which probably doesn't answer your question. In Ada, if you were use Ada.Sequential_IO(T) to write out a file (of data of type T), and then Ada.Direct_IO(T) to read it back in again, it might work or it might not. The reason why is that on some systems the data format used by one package could well be different to that used by the other (and is entitled to be by the Ada language standard). This is especially likely, in practice, if type T is indefinite. As far as a typical modern OS is concerned, it is most likely there is no distinction between sequential and direct binary files (they are all randomly accessible, and often memory-mapped anyway). -- Nick Roberts