comp.lang.ada
 help / color / mirror / Atom feed
From: jan.de.kruyf@gmail.com
Subject: Re: Why does that work?
Date: Thu, 5 Mar 2015 22:20:10 -0800 (PST)
Date: 2015-03-05T22:20:10-08:00	[thread overview]
Message-ID: <95716e6b-e817-487e-874d-a3f604358263@googlegroups.com> (raw)
In-Reply-To: <adb69c1c-6629-4f4d-bb16-e740567ef62d@googlegroups.com>

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.

  parent reply	other threads:[~2015-03-06  6:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-03 22:36 Why does that work? Laurent
2015-03-04  5:51 ` Laurent
2015-03-04 15:46   ` David Botton
2015-03-04 17:35     ` Simon Wright
2015-03-04 18:38       ` Laurent
2015-03-05 19:13         ` jan.de.kruyf
2015-03-05 21:16           ` Laurent
2015-03-06  0:51             ` Ada Video Course David Botton
2015-03-06 15:42               ` Jacob Sparre Andersen
2015-03-06 17:01                 ` G.B.
2015-03-06 21:17                 ` David Botton
2015-03-06  6:20             ` jan.de.kruyf [this message]
2015-03-06 13:28               ` Why does that work? Laurent
2015-03-06 14:07                 ` G.B.
2015-03-06 14:24                   ` jan.de.kruyf
replies disabled

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