Help with Tlist

BlitzMax Forums/BlitzMax Beginners Area/Help with Tlist

You can do this
'FirstLink(), Value() and NextLink()
'Note that Value() and NextLink Methods from Type TLink
'Whereas FirstLink() is a method from Type TList
SuperStrict

Local MyList:TList = CreateList() 
MyList.AddFirst("A")
MyList.AddFirst("B")
MyList.AddFirst("C")

Local NLink:TLink = MyList.FirstLink() 'get first Link
Repeat
   Print NLink.Value().ToString() 'Need to convert value from object to string
   NLink = NLink.NextLink()       'Move to the next link in list
Until Nlink = Null                'Null means we've reached the end of the list

================
Output
C
B
A

also see this link on some TList discussion
http://www.blitzmax.com/Community/posts.php?topic=67469