for loops and lists?

BlitzMax Forums/BlitzMax Beginners Area/for loops and 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.

You are GOD to the computer so you say

FOR X exists and it WILL BE of values beteen 1 and 10
Do all your stuff at this value of X
let X be it next vaue
For x=1 to 10
..
..
next

FOR X exists and it will BE A pretend name for each object in this list
Do all your stuff with X as this object
let X be the next obect
 For X:Object = Eachin MyList:Tlist
..
..
Next X


So if you have a Tlist of (say) Ship, then
For X:Ship = Eachin Shiplist:Tlist

Basicly you have to make sure that when you make a ship NewShip() you add it to a list of ships