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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.102.66 with SMTP id fm2mr13765230pab.4.1425622811142; Thu, 05 Mar 2015 22:20:11 -0800 (PST) X-Received: by 10.140.104.174 with SMTP id a43mr226303qgf.2.1425622811092; Thu, 05 Mar 2015 22:20:11 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!hl2no5415225igb.0!news-out.google.com!db6ni44597igc.0!nntp.google.com!hl2no5415219igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 5 Mar 2015 22:20:10 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=105.236.22.103; posting-account=orbgeAkAAADzWCTlruxuX_Ts4lIq8C5J NNTP-Posting-Host: 105.236.22.103 References: <7ffd1bf0-b815-474d-a4f2-cf471db0be37@googlegroups.com> <3a73a17d-2c37-47d2-9049-522632c24c15@googlegroups.com> <2a87cf3b-8621-4f5e-89a5-be4045eba583@googlegroups.com> <84f081dc-3d9d-4229-9b83-82854621e8de@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <95716e6b-e817-487e-874d-a3f604358263@googlegroups.com> Subject: Re: Why does that work? From: jan.de.kruyf@gmail.com Injection-Date: Fri, 06 Mar 2015 06:20:11 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:25116 Date: 2015-03-05T22:20:10-08:00 List-Id: On Thursday, March 5, 2015 at 11:16:21 PM UTC+2, Laurent wrote: > > The actual question is more curiosity than a problem. > Basically the iterator (a record) has a pointer to the list structure, so that is why the list head an tail can be addressed via the iterator. And the iterator has a pointer to the current list item of course, in order to address the individual items via an iterator. And the list itself is a linked list with forward (to the next item) and backward (to the previous item) links in each item. So the item is a record again, and the list is a series of those records linked together via the forward and the backward links. Please read Moti Ben Ari carefully, he is one of the very few teachers that manages to actually _teach_ in stead of just burbling little knowledge items. Here you will find source code for some of the examples: http://www.weizmann.ac.il/sci-tea/benari/books/index.html look for the second edition of the book. I think its one edition ahead of the pdf, But hopefully they will still be similar. The sun rose beautifully this morning. The whole world is full of Glory! Sometimes I stand in awe. j.