comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@gnat.com (Robert Dewar)
Subject: Re: have to use unrestricted access but just what about access
Date: 21 Jun 2002 04:45:08 -0700
Date: 2002-06-21T11:45:09+00:00	[thread overview]
Message-ID: <5ee5b646.0206210345.2d58d8e0@posting.google.com> (raw)
In-Reply-To: wccznxqni7o.fsf@shell01.TheWorld.com

Robert A Duff <bobduff@shell01.TheWorld.com> wrote in message news:<wccznxqni7o.fsf@shell01.TheWorld.com>...
> "chris.danx" <spamoff.danx@ntlworld.com> writes:
> 
> > How can the unrestricted_access attribute be replaced by just access in the
> > following code?
> 
> You should be using 'Unchecked_Access here, which is a standard feature
> of Ada (albeit unsafe).
> 
> 'Unrestricted_Access is a feature of GNAT, and is not necessary in your
> example.
> 
> - Bob

Bob look again!

One of the nasty restrictions in Ada 95 is that you cannot make parameters
aliased. This means that they can never be used in access attributes. This
is indeed one use of unrestricted access that is useful and legitimate, though
of course passing such an access value out assumes call by reference, and you
have to be sure that you can gaurantee call by reference.



  reply	other threads:[~2002-06-21 11:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-19 23:32 have to use unrestricted access but just what about access chris.danx
2002-06-20  8:41 ` chris.danx
2002-06-20 12:10 ` SteveD
2002-06-20 14:22 ` Robert A Duff
2002-06-21 11:45   ` Robert Dewar [this message]
2002-06-22  0:49     ` Robert A Duff
2002-06-22  1:05       ` Ted Dennison
2002-06-22 12:09         ` Robert Dewar
2002-07-20  4:59     ` Craig Carey
2002-07-20 17:47       ` Robert A Duff
2002-07-21  8:45         ` Craig Carey
2002-06-20 16:05 ` Robert Dewar
2002-06-20 17:11   ` chris.danx
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox