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.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1e67a7db835cf5a8 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Binary files vs Portablity vs Ada Date: 1999/11/06 Message-ID: <7vvrin$gp9$1@nnrp1.deja.com>#1/1 X-Deja-AN: 544947160 References: <7vt67r$qv0$1@coward.ks.cc.utah.edu> <7vurt3$ojd$1@nnrp1.deja.com> <7vuto0$pv0$1@nnrp1.deja.com> X-Http-Proxy: 1.0 x23.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Sat Nov 06 00:08:56 1999 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-11-06T00:00:00+00:00 List-Id: In article <7vuto0$pv0$1@nnrp1.deja.com>, Ted Dennison wrote: > There's no reason to > expect that your vendor would do something goofy with the data > (like compress it or something), but there's nothing stopping > them either. This is unnecessary FUD :-) There is specific implementation advice on this subject: Implementation Advice 17 If a stream element is the same size as a storage element, then the normal in-memory representation should be used by Read and Write for scalar objects. Otherwise, Read and Write should use the smallest number of stream elements needed to represent all values in the base range of the scalar type. Now an implementation could conceivably refuse to follow this implementation advice, but then it must document this fact: 1 The Ada language allows for certain machine dependences in a controlled manner. Each Ada implementation must document all implementation-defined characteristics: 2 Whether or not each recommendation given in Implementation Advice is followed. See 1.1.2(37). So if you are really worried by Ted's concerns, then just check your compiler documentation, for GNAT for example you will find: @cindex Stream oriented attributes @item 13.13.2(17): Stream Oriented Attributes ... (repeat of quote above) Followed. Reassuring you that GNAT does not do crazy things. Note that if you start worrying about craziness at this level, almost no compiler is useful for anything :-) > I believe that's probably against the LRM (It says > elements are written in "cannonical" order), yes it's a plain bug!!! > but the point is that > unless you write everything yourself, the only thing you can really > count on when you are using default stream implementations is that 'Read > will be able to retrieve what 'Write wrote, if both were compiled with > the same compiler on the same platform. No, that's too pessimistic. Sent via Deja.com http://www.deja.com/ Before you buy.