comp.lang.ada
 help / color / mirror / Atom feed
From: nickroberts@blueyonder.co.uk (Nick Roberts)
Subject: Re: Diffrence between a sequential binairies file and direct binairies file
Date: Sat, 07 Sep 2002 15:32:08 GMT
Date: 2002-09-07T15:32:08+00:00	[thread overview]
Message-ID: <3d7a1901.559077245@news.cis.dfn.de> (raw)
In-Reply-To: mailman.1031406782.31963.comp.lang.ada@ada.eu.org

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



       reply	other threads:[~2002-09-07 15:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1031406782.31963.comp.lang.ada@ada.eu.org>
2002-09-07 15:32 ` Nick Roberts [this message]
2002-09-09 10:00 ` Diffrence between a sequential binairies file and direct binairies file Georg Bauhaus
replies disabled

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