comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Possible GNAT problem with aliased parameters.
Date: Fri, 18 Oct 2013 20:59:58 -0500
Date: 2013-10-18T20:59:58-05:00	[thread overview]
Message-ID: <l3sp2u$qrl$1@loke.gir.dk> (raw)
In-Reply-To: 12afac91-f0f3-4f89-ac0f-a61aaf7b8d4b@googlegroups.com

Right. To expand on this a bit: an "in" parameter is a constant, of course. 
"aliased" doesn't change that. If you want to be able to modify the 
parameter, it has to be an "in out" parameter.

Similarly, "aliased" doesn't change the accessibility rules (with one 
exception regarding function results), so you still have to use local access 
types. The primary reason we added it to the language is to allow the 
"reference" objects to work on containers (like the bounded containers) that 
directly contain the elements. Of course, we made it general enough that it 
can be used for other reasons as well.

                     Randy.

<sbelmont700@gmail.com> wrote in message 
news:12afac91-f0f3-4f89-ac0f-a61aaf7b8d4b@googlegroups.com...
> Either your array has to be 'access constant', or your aliased parameter 
> has to be 'in out'.  Though, as written, you will still fail the 
> accessibility check... 




  reply	other threads:[~2013-10-19  1:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-18 16:01 Possible GNAT problem with aliased parameters Shark8
2013-10-18 16:51 ` sbelmont700
2013-10-19  1:59   ` Randy Brukardt [this message]
2013-10-19  5:48     ` Shark8
2013-10-19  7:48       ` Dmitry A. Kazakov
2013-10-19 14:30       ` sbelmont700
2013-10-19 21:17         ` Shark8
2013-10-20  6:29           ` Shark8
2013-10-20 15:33             ` sbelmont700
2013-10-21  0:29               ` Shark8
2013-10-21  0:55                 ` sbelmont700
replies disabled

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