* Re: Diffrence between a sequential binairies file and direct binairies file [not found] <mailman.1031406782.31963.comp.lang.ada@ada.eu.org> @ 2002-09-07 15:32 ` Nick Roberts 2002-09-09 10:00 ` Georg Bauhaus 1 sibling, 0 replies; 2+ messages in thread From: Nick Roberts @ 2002-09-07 15:32 UTC (permalink / raw) On Sat, 7 Sep 2002 09:52:13 -0400, "Dominic D'Apice" <dapiced@sympatico.ca> 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 ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Diffrence between a sequential binairies file and direct binairies file [not found] <mailman.1031406782.31963.comp.lang.ada@ada.eu.org> 2002-09-07 15:32 ` Diffrence between a sequential binairies file and direct binairies file Nick Roberts @ 2002-09-09 10:00 ` Georg Bauhaus 1 sibling, 0 replies; 2+ messages in thread From: Georg Bauhaus @ 2002-09-09 10:00 UTC (permalink / raw) Dominic D'Apice <dapiced@sympatico.ca> wrote: : Can someone can explain what is the main difference between a sequential : binairies file and direct binairies file ? If I understand your question correctly, one difference is the way of access to the elements making up the file. With sequential files you can read one element after the other, if the file has been opend with mode In_File. If it has been opened with mode Out_File, you can write one element after the other. With direct access files, you can, for example, choose which element you want to read, directly, without having to read the sequence of elements before this element. There is more information about this the reference manual, see A.8. -- Georg ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-09-09 10:00 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <mailman.1031406782.31963.comp.lang.ada@ada.eu.org> 2002-09-07 15:32 ` Diffrence between a sequential binairies file and direct binairies file Nick Roberts 2002-09-09 10:00 ` Georg Bauhaus
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox