comp.lang.ada
 help / color / mirror / Atom feed
From: "Matt Tyler" <matt_tyler@hotmail.com>
Subject: Doubly linked list (again, sorry)
Date: 1998/12/16
Date: 1998-12-16T00:00:00+00:00	[thread overview]
Message-ID: <7580p3$q00@romeo.logica.co.uk> (raw)

Hello.

I have created a doubly linked list. With the procedure (body only)

List:=new cell'(V,Next=>, Prev=>null);

V=integer and prev,next are access types to next and previous cells in list.

I want to loop through the list in both directions. I can loop in the
reverse order to creation using a loop containing:

L:=L.Next;       (where L is also an access type to cell)

To loop from start of list do I need to create a (say) Start_of_list access
type to the first cell in the list or is there a more elegant way that I am
missing.

Also, when I remove (to delete) a record from the list do I have to
de-allocate the memory occupied by the object or is it done for me.

I am sorry to waste your time but I am having a few problems with access
types. Thanks in advance

Matt Tyler







             reply	other threads:[~1998-12-16  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-16  0:00 Matt Tyler [this message]
1998-12-16  0:00 ` Doubly linked list (again, sorry) Ricardo Palomares Martínez
1998-12-17  0:00   ` bwefler
1998-12-17  0:00   ` Mats Weber
1998-12-18  0:00     ` Ricardo Palomares Martínez
replies disabled

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