comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: Possible GNAT problem with aliased parameters.
Date: Fri, 18 Oct 2013 22:48:58 -0700 (PDT)
Date: 2013-10-18T22:48:58-07:00	[thread overview]
Message-ID: <0bb058fa-df1b-4092-a6f9-47d12a5f5791@googlegroups.com> (raw)
In-Reply-To: <l3sp2u$qrl$1@loke.gir.dk>

On Friday, October 18, 2013 7:59:58 PM UTC-6, Randy Brukardt wrote:
> 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.

I see. That's not an issue in my little test-project, it's the same underlying idea: Have a node that has some number of other nodes as children. The common usage-case would be reading this sort of graph from a file (Write seldom, read many), which should mean that parameters needn't be modifiable.


> Similarly, "aliased" doesn't change the accessibility rules (with one 
> exception regarding function results), so you still have to use local access 
> types. 

I see that now -- and now I'm trying to figure a way to do it; possibly making the test-module a library-level unit (and thus on-par with the access level of the given package, assuming that it's also library-level, right?

> 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.

Right, I was hoping to avoid containers for the time being... and they wouldn't help in this instance, would they?


  reply	other threads:[~2013-10-19  5:48 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
2013-10-19  5:48     ` Shark8 [this message]
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