From: Jere <jhb.chat@gmail.com>
Subject: Re: non record limited type
Date: Wed, 21 Feb 2018 13:42:12 -0800 (PST)
Date: 2018-02-21T13:42:12-08:00 [thread overview]
Message-ID: <ccdd37d6-1896-43ce-9856-8571773ded9e@googlegroups.com> (raw)
In-Reply-To: <3a2e91d4-f563-4843-9c80-5a76732626d3@googlegroups.com>
On Wednesday, February 21, 2018 at 10:58:18 AM UTC-5, Mehdi Saada wrote:
>
> Also, another question: if only the public view is limited, what about the parameter passing ? Is it by reference or copy, when such copy are made in the body ? I would guess by copy, but I prefer to ask
I can't answer why on your first question, but on this one:
The RM in section 6.2 specifies how parameter passing is done based on the type.
http://www.ada-auth.org/standards/12rm/html/RM-6-2.html#I3382
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);
next prev parent reply other threads:[~2018-02-21 21:42 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 [this message]
2018-02-21 22:29 ` Mehdi Saada
2018-02-21 23:08 ` Jere
2018-02-21 23:14 ` Jere
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