Lists

BlitzMax Forums/BlitzMax Beginners Area/Lists

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Arg, this documentation is killing me:-)

What would the syntax be to get the next object in a list.

For example:

Type MyType
	Field Value:Int
End Type

Local MyList:TList = CreateList()
Local MyStuff:MyType

For x = 1 To 5
	MyStuff= New MyType
	MyStuff.Value=5
	ListAddLast MyList,MyStuff
Next


So to get the first object in the list:
MyStuff = MyType(MyList.First())
print MyStuff.Value


However, now i want to get the next object. I dont want to loop through with eachin because I need to keep my position and come back to it.

I am trying to get NextLink to work, but I cant figure out the syntax to get what I need.

Any suggestions?