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=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a24:2752:: with SMTP id g79-v6mr12251175ita.4.1539581841470; Sun, 14 Oct 2018 22:37:21 -0700 (PDT) X-Received: by 2002:a9d:3f09:: with SMTP id m9mr249520otc.5.1539581841274; Sun, 14 Oct 2018 22:37:21 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!feeder4.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!z5-v6no435231ite.0!news-out.google.com!l70-v6ni366itb.0!nntp.google.com!x98-v6no437749ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 14 Oct 2018 22:37:20 -0700 (PDT) In-Reply-To: <9d90fa3e-f800-4086-bf97-a65474a8140a@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=62.121.55.154; posting-account=9KbC2woAAAA0kK2IAUr3-FkzJBtOzrhm NNTP-Posting-Host: 62.121.55.154 References: <9d90fa3e-f800-4086-bf97-a65474a8140a@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <26848160-dc98-42b7-9d80-813d3d42bcfb@googlegroups.com> Subject: Re: Examining individual bytes of an integer From: =?UTF-8?B?SGVucmlrIEjDpHJrw7ZuZW4=?= Injection-Date: Mon, 15 Oct 2018 05:37:21 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:54573 Date: 2018-10-14T22:37:20-07:00 List-Id: Thanks everyone for the very insightful answers! Learned a bunch again. :) In this particular case I don't need to worry about the endianness, it's more of an "artistic" approach to see the individual bytes. :) But I can certainly see Niklas' point with different systems. I was also reading about the memory overlays, those that Matt described, but it was mentioned to be a bit dangerous, if one makes writes with it and is not careful about the correct sizes of source and target. https://en.wikibooks.org/wiki/Ada_Programming/Type_System#Overlays