comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: access assignation. Aliasing problems?
Date: Sat, 02 Feb 2008 05:37:46 -0500
Date: 2008-02-02T05:37:46-05:00	[thread overview]
Message-ID: <usl0bod8l.fsf@stephe-leake.org> (raw)
In-Reply-To: wtJoj.11347$yE1.9258@attbi_s21

"Jeffrey R. Carter" <spam.jrcarter.not@acm.nospam.org> writes:

> Javi wrote:
>>          L.Last := new ListNode'(Item => It, next => null);
>>          L.First := L.Last; -- this fails, L.First and L.Last are both
>> the same type access ListNode
>
> I suspect you're saying that type List has components such as
>
> type List is record
>     First : access Listnode;
>     Last  : access Listnode;

In particular, these are _not_ the "same type". In C, they would be,
because there "same type" means "same contents". In Ada, "same type"
means "same name". The types here have _no_ name; they are
anonymous. So they are not the same.

-- 
-- Stephe



  reply	other threads:[~2008-02-02 10:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-01 10:01 access assignation. Aliasing problems? Javi
2008-02-01 14:02 ` Robert A Duff
2008-02-01 18:24 ` Jeffrey R. Carter
2008-02-02 10:37   ` Stephen Leake [this message]
2008-02-02 21:02     ` Javi
replies disabled

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