I don't *have* to keep track of TLinks, do I?

BlitzMax Forums/BlitzMax Beginners Area/I don't *have* to keep track of TLinks, do I?


You can cycle endless in both directions, forward / backward without ever reaching an end.



Is this true?
I might have misunderstood but the following suggests no link from bottom of the list to the top.
Graphics 640,480,0
mylist:TList=CreateList()
Type mytype
  Field count:Int
End Type
For Local x = 1 To 10
   s:mytype = New mytype
   s.count=x
   ListAddLast mylist,s
Next
my_firstlink:TLink = mylist.firstlink()
currentlink:TLink = my_firstlink
s:mytype = mytype(my_firstlink.value())
While Not KeyHit(key_escape)
   Cls
   Select mykey
     Case key_left
		  my_firstlink:TLink = mylist.firstlink()
          currentlink:TLink = my_firstlink
          s:mytype = mytype(my_firstlink.value())
          DrawText "my_firstlink:TLink = mylist.firstlink() ; s:mytype = mytype(my_firstlink.value())",0,0
          DrawText "my_firstlink count field = " + s.count, 0,10
      
     Case key_right
          my_lastlink:TLink = mylist.lastlink()
          currentlink:TLink = my_lastlink
          s:mytype = mytype(my_lastlink.value())
          DrawText "my_lastlink:TLink = mylist.lastlink() ; s:mytype = mytype(my_lastlink.value())",0,0
          DrawText "my_lastlink count field = " + s.count, 0,10
     Case key_up
          my_prevlink:TLink = currentlink.prevlink()
          If my_prevlink <> Null
	          currentlink:TLink = my_prevlink
	          s:mytype = mytype(my_prevlink.value())
	  	      DrawText "my_prevlink:TLink = mylist.prevlink() ; s:mytype = mytype(my_prevlink.value())",0,0
	          DrawText "my_prevlink count field = " + s.count, 0,10
	      Else
	          DrawText "No prevlink. Current position : " + s.count,0,0
	      EndIf
     Case key_down
          my_nextlink:TLink = currentlink.nextlink()
          If my_nextlink <> Null
              currentlink:TLink = my_nextlink
   		      s:mytype = mytype(my_nextlink.value())
	          DrawText "my_nextlink:TLink = mylist.nextlink() ; s:mytype = mytype(my_nextlink.value())",0,0
 	          DrawText "my_nextlink count field = " + s.count, 0,10
          Else
              DrawText "No nextlink : Current position : " + s.count,0,0
          EndIf
     Default 
          DrawText "Invalid Selection. Current position " + s.count,0,0     
     End Select
     Flip
 	 mykey=WaitKey()
     If mykey=27 Exit
Wend