comp.lang.ada
 help / color / mirror / Atom feed
From: Jere <jhb.chat@gmail.com>
Subject: Re: non record limited type
Date: Wed, 21 Feb 2018 15:14:33 -0800 (PST)
Date: 2018-02-21T15:14:33-08:00	[thread overview]
Message-ID: <b3ec45c7-2855-424c-88d7-886f6d509c0f@googlegroups.com> (raw)
In-Reply-To: <6e384796-4a5f-449a-8bf7-3b8fe974b4fc@googlegroups.com>

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 still be
> > a by-copy-type.  I don't know the RM's intention but the wording suggests that
> > at least.  Note you can also used the "aliased" keyword in a function/procedure
> > signature to enforce an aliased variable which will be passed by reference
> > as well: 
> > -- Object is passed by reference
> > procedure Do_Something(Object : aliased in out Some_Type);
> 
> Really ? Are you sure it "forces" the passing by reference ? But I remember 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 
explicitly aliased parameter of any type. Each value of a by-reference 
type has an associated object. For a parenthesized expression, 
qualified_expression, or type_conversion, this object is the one 
associated with the operand. For a conditional_expression, this 
object is the one associated with the evaluated dependent_expression.

  parent reply	other threads:[~2018-02-21 23:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-21 15:58 non record limited type Mehdi Saada
2018-02-21 21:42 ` Jere
2018-02-21 22:29   ` Mehdi Saada
2018-02-21 23:08     ` Jere
2018-02-21 23:14     ` Jere [this message]
2018-02-22  0:09       ` Mehdi Saada
2018-02-22  0:26         ` Mehdi Saada
2018-02-22  2:57           ` Jere
2018-02-22 16:45         ` Jeffrey R. Carter
2018-02-22 17:06           ` Dmitry A. Kazakov
2018-02-22  7:56       ` Simon Wright
2018-02-22  1:20     ` Randy Brukardt
2018-02-22  1:29 ` Randy Brukardt
2018-02-22  8:25   ` Dmitry A. Kazakov
2018-02-22 23:24     ` Randy Brukardt
2018-02-23  8:58       ` Dmitry A. Kazakov
replies disabled

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