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,69d70de9327389c7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-03 21:01:12 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: Simple Question - Direct Access to memory with ADA Date: 3 Jul 2002 21:01:12 -0700 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0207032001.e5d720f@posting.google.com> References: <3D21E96E.7030109@thedomain.net> NNTP-Posting-Host: 152.158.65.45 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1025755272 27158 127.0.0.1 (4 Jul 2002 04:01:12 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 4 Jul 2002 04:01:12 GMT Xref: archiver1.google.com comp.lang.ada:26853 Date: 2002-07-04T04:01:12+00:00 List-Id: Fredrick Smith wrote in message news:<3D21E96E.7030109@thedomain.net>... > *** post for FREE via your newsreader at post.newsfeed.com *** > Anyone have an efficient method to do this? will I need to use the > pragma Atomic as well? Am I going to have to resort to > Unchecked_Conversion? > > I hope I have made the question clear. > > Regards > Fred. What you are probably missing is that it is perfectly fine to use a dynamic expression in an address clause, so it is perfectly easy to write peek or poke functions that contain an address clause to address the memory. That gives you a diction essentially equivalent to C, As others have pointed out, your C code contains unchecked conversions, so why you should be so concerned about using this in Ada is peculiar. Probably you don't even think of the C cast as an unchecked and dangerous conversion (which makes the point for the Ada design I think :-)