comp.lang.ada
 help / color / mirror / Atom feed
From: "Thierry Lelegard" <thierry.lelegard@canal-plus.fr>
Subject: Re: Sequential_IO Data Portability
Date: 2000/01/28
Date: 2000-01-28T19:29:22+00:00	[thread overview]
Message-ID: <86sqmi$p4v$1@minus.oleane.net> (raw)
In-Reply-To: 38903e96@eeyore.callnetuk.com

> A question was asked in GNAT chat recently as to (I hope I paraphrase
> closely enough) whether, in general, the data written, via Sequential_IO, by
> a brand of Ada compiler for one machine/OS target can be expected to be read
> by a program, using the same type and Sequential_IO, compiled by the same
> brand of compiler, but for a different target.

This issue does not only depend on the compiler. It also depends on the
target OS and/or file-system. On OS with a "primitive" implementation
of files, a file is simply an unstructured stream of bytes. This includes
all variants of UNIX and Windows (OK, this a large part of the computer
base). However, on some other OS, a file is a structured set of records.
In that case, Sequential_IO files are likely to be implemented as one
file record for one Sequential_IO Put operation. In that case, pushing
such a file on UNIX using a binary FTP will result in a file which contains
many "metadata" from the source OS which are interpreted as data on UNIX.
They are valid files for UNIX, but invalid for the compiler.
On the contrary, pushing a UNIX file on the other OS will give an invalid
file for the OS. One example of such an OS is OpenVMS (although OpenVMS
also allows unstructured low-level binary I/O on files).

-Thierry
__________________<< WARNING: NEW ADDRESS AND TELEPHONE >>__________________

Thierry Lelegard, "The Jazzing Troll", Email: thierry.lelegard@canal-plus.fr
CANAL+ Technologies, 34 place Raoul Dautry, 75516 Paris Cedex 15, France
Tel: +33 1 71 71 54 30   Fax: +33 1 71 71 52 08   Mobile: +33 6 03 00 65 75
____________________________________________________________________________






  parent reply	other threads:[~2000-01-28  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-25  0:00 Sequential_IO Data Portability Nick Roberts
2000-01-27  0:00 ` Robert A Duff
2000-01-28  0:00 ` Thierry Lelegard [this message]
2000-01-31  0:00 ` Tony Matthews
2000-01-31  0:00 ` Tony Matthews
2000-01-31  0:00   ` Ted Dennison
2000-02-01  0:00   ` Jean-Pierre Rosen
2000-02-01  0:00     ` Tony Matthews
2000-02-01  0:00   ` Andy
2000-02-01  0:00     ` Tony Matthews
replies disabled

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