From: dewar@gnat.com (Robert Dewar)
Subject: Re: Simple Question - Direct Access to memory with ADA
Date: 3 Jul 2002 21:01:12 -0700
Date: 2002-07-04T04:01:12+00:00 [thread overview]
Message-ID: <5ee5b646.0207032001.e5d720f@posting.google.com> (raw)
In-Reply-To: 3D21E96E.7030109@thedomain.net
Fredrick Smith <ascii@thedomain.net> 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 :-)
prev parent reply other threads:[~2002-07-04 4:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-02 17:57 Simple Question - Direct Access to memory with ADA Fredrick Smith
2002-07-02 19:46 ` Pat Rogers
2002-07-02 20:23 ` Robert A Duff
2002-07-04 4:01 ` Robert Dewar [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox