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 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.52.186.103 with SMTP id fj7mr2813395vdc.8.1407946012084; Wed, 13 Aug 2014 09:06:52 -0700 (PDT) X-Received: by 10.140.21.175 with SMTP id 44mr49132qgl.14.1407946012023; Wed, 13 Aug 2014 09:06:52 -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!v10no6777067qac.1!news-out.google.com!b3ni24360qac.1!nntp.google.com!j15no6846099qaq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 13 Aug 2014 09:06:51 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=73.179.102.101; posting-account=wEPvUgoAAABrLeiz_LRhQ3jeEhyfWVMH NNTP-Posting-Host: 73.179.102.101 References: <892c6798-489d-400a-bb9a-7a14605c493f@googlegroups.com> <58a951df-217b-48ee-bd0b-f9953f5b622b@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Pointer to instance of indefinite array? From: NiGHTS Injection-Date: Wed, 13 Aug 2014 16:06:52 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:21720 Date: 2014-08-13T09:06:51-07:00 List-Id: On Wednesday, August 13, 2014 12:28:14 AM UTC-4, Jeffrey Carter wrote: > On 08/12/2014 08:06 PM, NiGHTS wrote: >=20 > > >=20 > > Hmm. You're right. It worked! Compiler must be changing it internally t= o a >=20 > > pointer though since it would be far too inefficient to copy the entire >=20 > > array. >=20 >=20 >=20 > The parameter-passing mechanism used by the compiler is generally not som= ething=20 >=20 > we need to worry about. >=20 >=20 >=20 > Having to explicitly pass a pointer to obtain by-reference semantics is a= mark=20 >=20 > of low-level languages. It is not a good way to do almost anything. >=20 >=20 >=20 > In a mid-level language, such as Pascal, one often specifies the=20 >=20 > parameter-passing mechanism, and the compiler uses that mechanism. This i= s=20 >=20 > pretty much what VAR (by reference) and non-VAR (by copy) parameters are = in=20 >=20 > Pascal, though they're usually described in terms of whether or not chang= es to=20 >=20 > the formal parameter also change the actual. >=20 >=20 >=20 > In a high-level language, such as Ada, one specifies how the subprogram u= ses the=20 >=20 > parameter (in, in out, and out modes) and the compiler uses that and the = type=20 >=20 > being passed to determine the parameter-passing mechanism. >=20 >=20 >=20 > --=20 >=20 > Jeff Carter >=20 > "That was the most fun I've ever had without laughing." >=20 > Annie Hall >=20 > 43 Is it possible to have a constrained array of indefinite arrays without usi= ng access? In my target program, the "Do_Something_With_Array" function is = actually an interface to a FIFO queue where groups of indefinite arrays are= temporarily buffered for use by another task. Of course this will be via a= n entry to a protected object but those details aside how can I construct a= constrained array of indefinite arrays?