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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a676349b69fa778f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-11 16:32:07 PST Path: supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!arclight.uoregon.edu!enews.sgi.com!newshub2.rdc1.sfba.home.com!news.home.com!news1.frmt1.sfba.home.com.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Help: my list adt is broken References: <79Dh6.10732$zz4.264993@news2-win.server.ntlworld.com> X-Newsreader: Tom's custom newsreader Message-ID: Date: Mon, 12 Feb 2001 00:29:01 GMT NNTP-Posting-Host: 24.20.190.201 X-Complaints-To: abuse@home.net X-Trace: news1.frmt1.sfba.home.com 981937741 24.20.190.201 (Sun, 11 Feb 2001 16:29:01 PST) NNTP-Posting-Date: Sun, 11 Feb 2001 16:29:01 PST Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: supernews.google.com comp.lang.ada:5133 Date: 2001-02-12T00:29:01+00:00 List-Id: Each list node is pointed to by two things: its successor and its predecessor. When you delete an item in mid-list you make two fixes: t.prev.next := p.next; t.next.prev := p.prev; But when you delete a head item, or a tail item, you only make one fix. The tail error you saw when you traversed the list forward. The head error you simply haven't noticed yet since you haven't tried traversing the list backward.