From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,17182d99840be79c X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!u10g2000prn.googlegroups.com!not-for-mail From: Javi Newsgroups: comp.lang.ada Subject: Re: access assignation. Aliasing problems? Date: Sat, 2 Feb 2008 13:02:38 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <6766a791-abf3-4571-b5f7-98751a948f13@j78g2000hsd.googlegroups.com> NNTP-Posting-Host: 88.27.89.50 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1201986158 24534 127.0.0.1 (2 Feb 2008 21:02:38 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 2 Feb 2008 21:02:38 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: u10g2000prn.googlegroups.com; posting-host=88.27.89.50; posting-account=k8j1NwoAAABh1tdgXNQ0vrLWXUAxypwQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:19690 Date: 2008-02-02T13:02:38-08:00 List-Id: On Feb 2, 11:37 am, Stephen Leake wrote: > "Jeffrey R. Carter" 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 !