Returning the Complete Array of types

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

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.

Is this what you mean ?

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

Dim race.cars(100)
For i=1 To 100
  c=6
  While c>=5
    b=Rnd (4)
    If b>=2 Then
      race(i)= New cars
      race(i)\wheels=Rand (4)
      race(i)\CarNumber=i
    EndIf
    c=Rnd(10)
  Wend
Next
;For m=1 To 100

For s.cars =Each cars
  Print s\CarNumber+ ". "+s\wheels
Next
;Next

I added Carnumber to the Car Type, so i could check output.