From: Brad Moore <brad.moore@shaw.ca>
Subject: Re: A question about syntax or semantics
Date: Sat, 17 May 2014 20:47:31 -0600
Date: 2014-05-17T20:47:31-06:00 [thread overview]
Message-ID: <CbVdv.2039585$pa5.172930@fx23.iad> (raw)
In-Reply-To: <ll8peq$96q$1@speranza.aioe.org>
On 14-05-17 04:56 PM, Victor Porton wrote:
> From Ada2012 Reference Manual:
>
> arm2012.html/rm-4-1-3.html
>
> [[[
> A selected_component that is not an expanded name shall resolve to denote
> one of the following:
>
> A view of a subprogram whose first formal parameter is of a tagged type
> or is an access parameter whose designated type is tagged:
> ]]]
>
> Why it is significant to have it only for the first formal parameter?
>
> Please explain with examples.
>
>
This question is worded like an exam question, so rather than give the
answer directly, I'll respond with another question that might shed some
light on your question.
with Ada.Containers.Doubly_Linked_Lists;
procedure X is
package Integer_Lists is new
Ada.Containers.Doubly_Linked_Lists (Element_Type => Integer);
List1, List2 : Integer_Lists.List;
begin
List1.Append(1);
List2.Append(2);
List1.Move(List2);
end;
If we didn't have the rule that you are asking about, what could we say
about the Move call in the example above? Which list is the Source, and
which list is the Target parameter? Is List1 getting moved into List2,
or is it the other way around?
Brad
next prev parent reply other threads:[~2014-05-18 2:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-17 22:56 A question about syntax or semantics Victor Porton
2014-05-17 23:05 ` Bill Findlay
2014-05-18 2:47 ` Brad Moore [this message]
2014-05-18 10:48 ` Simon Wright
2014-05-18 14:40 ` [OT] Assembly language syntax, was: " Simon Clubley
2014-05-18 14:50 ` Simon Wright
2014-05-19 17:02 ` Adam Beneschan
2014-05-19 21:35 ` Randy Brukardt
2014-05-19 22:05 ` Bill Findlay
2014-05-19 22:58 ` Robert A Duff
2014-05-20 8:01 ` Georg Bauhaus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox