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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.Oh2LSLzxQ4+YU0Htrufc+A.user.gioia.aioe.org!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Creating several types from a base type and conversion Date: Sun, 19 Jan 2020 09:37:19 +0000 Organization: Aioe.org NNTP Server Message-ID: References: <4b0649b3-aed2-44fd-822f-d6665b9352dd@googlegroups.com> <536e9961-f454-44d9-95a6-aecaaee1addf@googlegroups.com> NNTP-Posting-Host: Oh2LSLzxQ4+YU0Htrufc+A.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin) X-Notice: Filtered by postfilter v. 0.9.2 Cancel-Lock: sha1:1AUmqEx8EVhxd4HemQlvhLUOSkw= Xref: reader01.eternal-september.org comp.lang.ada:57894 Date: 2020-01-19T09:37:19+00:00 List-Id: Ken Roberts writes: > On Saturday, January 18, 2020 at 3:38:27 PM UTC-8, Simon Wright wrote: >> Ken Roberts writes: >> >> > On Saturday, January 18, 2020 at 2:35:52 PM UTC-8, Simon Wright wrote: >> I can 100% assure you that the difference in results IS NOT caused by >> a difference in compilers: it IS caused by the fact that the code you >> sent us is not the same as the code you compiled. > > https://drive.google.com/file/d/1jZv-GcGL3PdqYqi60eIYZnRIndudZqic/view?usp=sharing > > Here's a google drive link to check out - no changes and no copy/paste Great, so that's a 31-line file, whereas the source you posted has 92 lines. https://groups.google.com/d/msg/comp.lang.ada/2gqi1zxDk4A/pUO5HBQgCQAJ I took "here is the code I'm working on" to mean "here is the code I'm working on" rather than "this is a sketch of the sort of thing I'd like to do, haven't tried to compile it yet". Anyway, you've got lots of good hints from others here, so I'll shut up, except for saying that I'd probably go with Bill Findlay's view: representation clauses where endianness is involved are a lot more confusing than shifts and masks.