Manually step through lists?

BlitzMax Forums/BlitzMax Beginners Area/Manually step through lists?

QuickSilva(Posted 2009) [#1]
In Blitz 3D you can easily use Before and After commands to manually iterate through a list.

Is this possible in BMax as I cannot find any similar commands after looking through the help file. I may have missed something though.

Thanks for any help,
Jason.


grable(Posted 2009) [#2]
This should do the trick:
Local n:TLink = list.FirstLink()
While n
  Print n.Value().ToString()
  n = n.NextLink()
Wend

Or LastLink and PrevLink for going backwards...


QuickSilva(Posted 2009) [#3]
Cheers, I`ll give it a go.

Jason.