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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e91f674b5db5e2b2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-15 16:47:59 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!212.74.64.35!colt.net!newspeer.highwayone.net!newspeer.clara.net!news.clara.net!news5-gui.server.ntli.net!ntli.net!news6-win.server.ntlworld.com.POSTED!not-for-mail From: "chris.danx" Newsgroups: comp.lang.ada References: <09Oo7.12082$mj6.1852826@news6-win.server.ntlworld.com> Subject: [Different Topic] Endianess? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Message-ID: Date: Sun, 16 Sep 2001 00:42:36 +0100 NNTP-Posting-Host: 62.253.12.12 X-Complaints-To: abuse@ntlworld.com X-Trace: news6-win.server.ntlworld.com 1000597364 62.253.12.12 (Sun, 16 Sep 2001 00:42:44 BST) NNTP-Posting-Date: Sun, 16 Sep 2001 00:42:44 BST Organization: ntlworld News Service Xref: archiver1.google.com comp.lang.ada:13097 Date: 2001-09-16T00:42:36+01:00 List-Id: How could one detect Endianess with Ada 95? I've seen some C snippets which exploit C arrays, but can see no obvious mapping to Ada 95. The C snippet says that for a union of a number and an array of 4 bytes, setting the number to one will have a one in the zeroth byte of the array for little endian, and zero for a big endian. How do I map this to Ada? Use an unchecked conversion perhaps? Is there another portable (simpler) way? Thanks, Chris