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 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3110709241972620 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Packing Record Structures in Ada Date: 1998/01/13 Message-ID: #1/1 X-Deja-AN: 315532967 References: <884639188.24707084@dejanews.com> X-Complaints-To: usenet@news.nyu.edu X-Trace: news.nyu.edu 884697804 13419 (None) 128.122.140.58 Organization: New York University Newsgroups: comp.lang.ada Date: 1998-01-13T00:00:00+00:00 List-Id: Randall says <> If this is an endianness difference then the differences are just what one would expect. If not, then one of the compilers is behaving in a very peculiar manner. You might want to say what machines and compilers are involved here to understand things better. I assume you have rep clauses for the two records? If not, then of course all bets are off, and the problem is yours (to expect any default layout to be applicable between two separate compilers is plain wrong). Note that if you use the distribution support in GNAT, all such issues are handled automatically, and indeed you can deal with the situation in a completely general manner, compiler independently, by using the stream facility in Ada 95. THe stream facility in Ada 95 is one of its very powerful features. I have the impression that a lot of Ada 95 programmers are not sufficiently aware of this very important capability, and its wide applicability to solving problems of this nature, either through explicit use, or implicit use via the distribution annex.