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=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38ceb882eed41e1e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-11 06:50:26 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!out.nntp.be!propagator-SanJose!in.nntp.be!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: <9ff447f2.0110100005.2503bb00@posting.google.com> Subject: Re: Size and pack Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Thu, 11 Oct 2001 09:49:58 EDT Organization: http://www.newsranger.com Date: Thu, 11 Oct 2001 13:49:58 GMT Xref: archiver1.google.com comp.lang.ada:14260 Date: 2001-10-11T13:49:58+00:00 List-Id: In article <9ff447f2.0110100005.2503bb00@posting.google.com>, Adrian Hoe says... .. >Why this happens? Can I use representation clause instead of pragma >pack? If both methods work, which is the best approach and why? Why doesn't really matter. If your types must be a certian size and/or your record fields must be in a certian order for your program to work, then you *must* use representation and size pragmas to force that. Not specifying sizes and record field locations is in effect telling the compiler that you don't really care how big it is or where it puts things. Even if it happens to work out allright today, it might not upon your next compiler version upgrade or software port. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced.