Returning the Complete Array of types

Blitz3D Forums/Blitz3D Programming/Returning the Complete Array of types

But the array DOES contain 30 cars...You have to be able to get them back somehow.

Graphics 800,600,32,2
SetBuffer BackBuffer()
Type cars
Field wheels
End Type

Dim race.cars(100)
For i=1 To 10
For h=1 To 3
race(i)= New cars
race(i)\wheels=Rand (4)
Next
Next

For rc.cars=Each cars
Print rc\wheels
Delay 100
Next


Here I can print them off quite happily as long as I do a complete iteration of the type which is very wasteful when you get a big array with lost of elements.

Darkheart