While the code big10p gave you is, as you asked, exactly like the C source, we should probably mention that you can iterate through automatically generated lists of type instances also (which basically cuts out having to use fixed size arrays):
Linked lists are pretty useful for games programming and you'll probably end up adopting them sooner or later.
Type dataT ; 'data' is a reserved word. Field x%, y% End Type currentDataT.dataT=Null; declarations are good For i = 0 To 9 currentDataT = New dataT currentDataT\x = i currentDataT\y = i*2 Next ;iterate through list of instances For currentDataT = Each dataT Print currentDataT\x+","+currentDataT\y Next WaitKey
Linked lists are pretty useful for games programming and you'll probably end up adopting them sooner or later.