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.107.3.84 with SMTP id 81mr3417160iod.103.1519254873828; Wed, 21 Feb 2018 15:14:33 -0800 (PST) X-Received: by 10.157.94.15 with SMTP id d15mr233782oti.4.1519254873746; Wed, 21 Feb 2018 15:14:33 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!w142no414941ita.0!news-out.google.com!10ni798ite.0!nntp.google.com!o66no414028ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 21 Feb 2018 15:14:33 -0800 (PST) In-Reply-To: <6e384796-4a5f-449a-8bf7-3b8fe974b4fc@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=71.171.117.31; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf NNTP-Posting-Host: 71.171.117.31 References: <3a2e91d4-f563-4843-9c80-5a76732626d3@googlegroups.com> <6e384796-4a5f-449a-8bf7-3b8fe974b4fc@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: non record limited type From: Jere Injection-Date: Wed, 21 Feb 2018 23:14:33 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Body-CRC: 2261823768 X-Received-Bytes: 2886 Xref: reader02.eternal-september.org comp.lang.ada:50529 Date: 2018-02-21T15:14:33-08:00 List-Id: On Wednesday, February 21, 2018 at 5:29:11 PM UTC-5, Mehdi Saada wrote: > > Based on that, your limited private which is really an integer would st= ill be > > a by-copy-type. I don't know the RM's intention but the wording sugges= ts that > > at least. Note you can also used the "aliased" keyword in a function/p= rocedure > > signature to enforce an aliased variable which will be passed by refere= nce > > as well:=20 > > -- Object is passed by reference > > procedure Do_Something(Object : aliased in out Some_Type); >=20 > Really ? Are you sure it "forces" the passing by reference ? But I rememb= er clearly have read somewhere, most probably on this forum that it wasn't = in Ada's philosophy to let one precise that, since it is an implementation = detail, and that the compiler shall decide by himself. Also, if you look into the section of the RM that I linked you in my first response, you will see that it is required to be that way RM 6.2 http://www.ada-auth.org/standards/12rm/html/RM-6-2.html ---------------------------------------------------------- A parameter of a by-reference type is passed by reference, as is an=20 explicitly aliased parameter of any type. Each value of a by-reference=20 type has an associated object. For a parenthesized expression,=20 qualified_expression, or type_conversion, this object is the one=20 associated with the operand. For a conditional_expression, this=20 object is the one associated with the evaluated dependent_expression.