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,d2cba5965c7bfcd5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-04 05:42:02 PST Message-ID: <3C83796E.9040703@users.sf.net> From: Dave Poirier User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020204 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: 64bit access to an array of 8bit values References: <3C823A1A.6030006@users.sf.net> <0CFB5EECF8614F8D.52C8F36A468D2F14.3AD3D533D2B72FDB@lp.airnews.net> <5ee5b646.0203040229.6ffc7ee3@posting.google.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 04 Mar 2002 08:41:02 -0500 NNTP-Posting-Host: 65.94.42.23 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1015249262 65.94.42.23 (Mon, 04 Mar 2002 08:41:02 EST) NNTP-Posting-Date: Mon, 04 Mar 2002 08:41:02 EST Organization: Bell Sympatico Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!tor-nx1.netcom.ca!news1.tor.metronet.ca!webster!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Xref: archiver1.google.com comp.lang.ada:20763 Date: 2002-03-04T08:41:02-05:00 List-Id: Larry Kilgallen wrote: > In article <5ee5b646.0203040229.6ffc7ee3@posting.google.com>, dewar@gnat.com (Robert Dewar) writes: > > > >>you want. There is nothing wrong with pointer conversion >>when it makes sense. >> > > Probably there _is_ a problem with pointer conversion when it does > not make sense. The issue is sorting out the two cases :-) > well, to help out a bit about this problem of mine, is that I want to create a virtual-computer out of Ada95, and I would greatly appreciate if the code could run on as many platform as possible. Considering the endianness, I somehow doubt now that pointer conversion is what I want, I see how it can be done but I see how my bytes are not going to end up at the right place on some architectures. So from what I gather, the best solution for as much portability as possible is to use an array of larger elements, then return only the part of each element that is required. Thanks for all the great replies! :) EKS - Dave Poirier