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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,60c0f30dbde782f6,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.66.78.6 with SMTP id x6mr7991626paw.42.1357839085691; Thu, 10 Jan 2013 09:31:25 -0800 (PST) X-Received: by 10.50.216.170 with SMTP id or10mr2362696igc.15.1357839085654; Thu, 10 Jan 2013 09:31:25 -0800 (PST) Path: 6ni99606pbd.1!nntp.google.com!ld4no10393582pbb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 10 Jan 2013 09:31:25 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=192.35.35.36; posting-account=YkFdLgoAAADpWnfCBA6ZXMWTz2zHNd0j NNTP-Posting-Host: 192.35.35.36 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Record Elements and Endian Conversion From: awdorrin Injection-Date: Thu, 10 Jan 2013 17:31:25 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2013-01-10T09:31:25-08:00 List-Id: I am migrating legacy code written for the PowerPC platform to X86, and hav= e been running into Endian issues throughout the code. In the latest issue I've discovered, a section of code in which a record ha= s been defined that has 111 components of various data types. Is there any mechanism within Ada that would provide a way to iterate acros= s all components of a record, perhaps providing their data types? Problem I have is that this record is used (via a MEMCPY call) to populate = a buffer used to transmit an message via Ethernet. While I have adjusted th= e record's representation clause to put the data fields of the record into = the correct bit location, those fields larger than a byte are of the wrong = Endianness within the buffer. Thanks, -Al