"That's because he's using cyclic references = poor design."
How are cyclic references poor design? Sometimes you need to have a list of objects AND know the link that contains a particular object, and for speed reasons looping through the whole list looking for that object isn't an option.
You know just making one simple change to Max would have made my life a lot simpler by rediucing the number of cycliuc references, and that is having For EachIn return the link pointer rather than returning the object the link points to. Then you could easily get the prev and next links.
See? Much cleaner than that while loop. And you could add a third line in there to save the point pointer so you don't need to keep using Point(Link.Value()), if you needed to use that many times in the loop.
How are cyclic references poor design? Sometimes you need to have a list of objects AND know the link that contains a particular object, and for speed reasons looping through the whole list looking for that object isn't an option.
You know just making one simple change to Max would have made my life a lot simpler by rediucing the number of cycliuc references, and that is having For EachIn return the link pointer rather than returning the object the link points to. Then you could easily get the prev and next links.
For Link = EachIn PointList If (Distance# + Point(Link.Value())._SegmentLength#) > Px# Then Exit Distance# = Distance# + Point(Link.Value())._SegmentLength# Next
See? Much cleaner than that while loop. And you could add a third line in there to save the point pointer so you don't need to keep using Point(Link.Value()), if you needed to use that many times in the loop.