[futurebasic] Re: Linked Lists

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 1998 : Group Archive : Group : All Groups

From: Peter Bancroft <pbancroft@...>
Date: Mon, 28 Sep 1998 08:31:03 +1000
Vic asked ...

>....  Alternatively,
>could someone kindly refer me to a book refenece that discusses the
>elements of Linked Lists?

Linked Lists are an interesting and useful concept.
They are not too difficult to understand.
Think of them as a database.
The database is not just one record occurring immediately after the
previous record. The last part of a record is a pointer (an address) to
where the next record is to be found. You can also make a pointer back to
the previous record.
So, when you modify a linked list, you only modify the last part of the
record, the part that points to the next record, or the previos record.

Here is an example

Item 1 is initially linked to item 2.
Later I want to link item ! to item 24.
All I need to do is change Item 1's link.
I change it from 2 to 24.

You could implement this as an array.
With some of the array elements being the address of the links.

Peter		mailto:peter@...		http://www.isoma.com