comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Problems with Dave's LinkedList
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Problems with Dave's LinkedList [message #24376] Mon, 02 April 2001 11:25 Go to previous message
s007amf is currently offline  s007amf
Messages: 8
Registered: January 2001
Junior Member
I am using Dave Fanning's LinkedList object and seem to have run into a
problem with it. In the procedure Delete_Node, I was getting a Invalid
Pointer error on line:

IF NOT Ptr_Valid((*currentNode).previous) THEN BEGIN

To me, it looks like the error occurs when the linked list only has one
node left. Dave has code that should deal with this condition on line:

IF index EQ (self.count - 1) THEN self->Delete_Last_Node

This code does deal with the above condition, but does not cause
Delete_Node to exit. Therefore, the list is empty and tries to execute
the first line I mentioned; which, causes a runtime error.

I changed the second line I mentioned into the following block of code
(which seems to fix the error):


IF index EQ (self.count - 1) THEN BEGIN
self->Delete_Last_Node
RETURN
END


--
Alan
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: wavelet
Next Topic: dlm creating an array?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:28:50 PDT 2025

Total time taken to generate the page: 0.00418 seconds