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 10:00:56 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sunqbc.risq.qc.ca!news.uunet.ca!tor-nx1.netcom.ca!news1.tor.metronet.ca!nnrp1.tor.metronet.ca!not-for-mail Message-ID: <3C83B64C.702@home.com> From: "Warren W. Gay VE3WWG" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 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> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 04 Mar 2002 18:00:44 GMT NNTP-Posting-Host: 198.96.47.195 NNTP-Posting-Date: Mon, 04 Mar 2002 11:00:44 MDT Organization: MetroNet Communications Group Inc. Xref: archiver1.google.com comp.lang.ada:20777 Date: 2002-03-04T18:00:44+00:00 List-Id: David C. Hoos, Sr. wrote: > How about something like this? > ... > function Value (Index : Ram_Range) return Interfaces.Unsigned_64 > is > Result : Interfaces.Unsigned_64; > for Result'Address use Ram (Index)'Address; > begin > return Result; > end Value; I don't think you'll find this particularly portable. Even if the compiler allows it, on some UNIX (for example) platforms you may get a SIGBUS error if the Index value is not on a word boundary (some CPUs like SPARC and other big endian machines seem to come to mind in this regard). There is another nit-pick with regards to safety if you try using Index values that would address the last 3 bytes of the available "RAM", returning a 4-byte value. -- Warren W. Gay VE3WWG http://home.cogeco.ca/~ve3wwg