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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e5140c483354bfcc,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!not-for-mail From: wom@inel.gov (Warren O. Merrill) Newsgroups: comp.lang.ada Subject: What is correct way to pack records Date: 17 Nov 2004 16:20:41 -0800 Organization: http://groups.google.com Message-ID: <3fc90377.0411171620.7a3bcfd9@posting.google.com> NNTP-Posting-Host: 134.20.163.106 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1100737242 4163 127.0.0.1 (18 Nov 2004 00:20:42 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 18 Nov 2004 00:20:42 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:6259 Date: 2004-11-17T16:20:41-08:00 List-Id: I want my record structures to byte align (for compatibility with existing files). I know about using the record representation clause to lay them out. I have a LOT of these to do and just wondering if any of the pragmas would be guaranteed to byte align my fields but NOT change the order of the fields to do it (NOTE THAT IS IMPORTANT!!!!!). So instead of: type MyRec is record Fld1 : character; Fld2 : character; Fld3 : character; end record; for MyRec use record Fld1 at 0 range 0 .. 7; Fld2 at 1 range 0 .. 7; Fld3 at 2 range 0 .. 7; end record; is there a pragma (or other method) that will do the same thing GUARANTEED not to change the field order to accomplish the packing without having to write all these record representation clauses?