comp.lang.ada
 help / color / mirror / Atom feed
* Doubly linked list (again, sorry)
@ 1998-12-16  0:00 Matt Tyler
  1998-12-16  0:00 ` Ricardo Palomares Martínez
  0 siblings, 1 reply; 5+ messages in thread
From: Matt Tyler @ 1998-12-16  0:00 UTC (permalink / 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







^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1998-12-18  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-16  0:00 Doubly linked list (again, sorry) Matt Tyler
1998-12-16  0:00 ` 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

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