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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.236.4.69 with SMTP id 45mr9717825yhi.20.1382217438042; Sat, 19 Oct 2013 14:17:18 -0700 (PDT) X-Received: by 10.182.72.225 with SMTP id g1mr76231obv.7.1382217437929; Sat, 19 Oct 2013 14:17:17 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!i2no22142643qav.0!news-out.google.com!9ni58915qaf.0!nntp.google.com!i2no22142635qav.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 19 Oct 2013 14:17:17 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=97.123.228.141; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 97.123.228.141 References: <9bc1be39-4377-4df5-8686-786babc756d1@googlegroups.com> <12afac91-f0f3-4f89-ac0f-a61aaf7b8d4b@googlegroups.com> <0bb058fa-df1b-4092-a6f9-47d12a5f5791@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <28e86e6c-f2e1-4cca-abce-cd6f73447f4d@googlegroups.com> Subject: Re: Possible GNAT problem with aliased parameters. From: Shark8 Injection-Date: Sat, 19 Oct 2013 21:17:18 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:17475 Date: 2013-10-19T14:17:17-07:00 List-Id: On Saturday, October 19, 2013 8:30:05 AM UTC-6, sbelm...@gmail.com wrote: >=20 > function Create (North, South, East, West : aliased in out Maze'Class:=3D= None) return Maze That won't work; the default and IN OUT cannot be used together. > The only way would be to hack it together with access discriminants: > > type Maze (n : access Maze'Class; > s : access Maze'Class; > e : access Maze'Class; > w : access Maze'Class) is tagged null record; That's rather unfortunate; having them in an array-component would be the b= est for the processing I'm planning [where a "fore X of" would be nice]. (W= hat I showed was a simplified example; there's a bit more in the actual str= ucture [two Strings]). >This is a shame, because the aliased parameter/access discriminant method = works so well for simple composition of one object, and extending it to arr= ays of objects would eliminate what is essentially the last unnecessary use= of access types (I bemoaned the inability to pass around arrays of local a= ccess types awhile back in another thread, and this is another good example= of why).=20 I think I understand what you're saying here; but would you give a usage-ex= ample of what you'd do with such?