comp.lang.ada
 help / color / mirror / Atom feed
From: Javi <fjvera@gmail.com>
Subject: Re: access assignation. Aliasing problems?
Date: Sat, 2 Feb 2008 13:02:38 -0800 (PST)
Date: 2008-02-02T13:02:38-08:00	[thread overview]
Message-ID: <a20f3cff-c3ae-4f3b-8e66-7bf1c8d12bb7@u10g2000prn.googlegroups.com> (raw)
In-Reply-To: usl0bod8l.fsf@stephe-leake.org

On Feb 2, 11:37 am, Stephen Leake <stephen_le...@stephe-leake.org>
wrote:
> "Jeffrey R. Carter" <spam.jrcarter....@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


Many thanks guys, as I said, I'm quiet new to Ada. I'm used to C
pointers :-)

Thanks a lot !



      reply	other threads:[~2008-02-02 21:02 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
2008-02-02 21:02     ` Javi [this message]
replies disabled

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