I don't think my problem is actually solved...
I want to do an iteration of the array and return each element of the type in the array with the index number.
Equivelent of doing:
But returning each element, when I try to do this I get wierd results.
This returns the elements each time.
I want to return each element just once but via index number.
So for example I could print ALL the types from index (4) but only those. Rather than EACH element of the array.
If I try this:
I get, "Expecting variable assingment".
Darkheart
I want to do an iteration of the array and return each element of the type in the array with the index number.
Equivelent of doing:
for i=1 to 10 print race(i).cars\wheels next
But returning each element, when I try to do this I get wierd results.
This returns the elements each time.
Graphics 800,600,32,2 SetBuffer BackBuffer() Type cars Field wheels End Type Dim race.cars(100) For i=1 To 10 race(i)= New cars race(i)\wheels=Rand (4) Next For m=1 To 10 For rc.cars=Each cars Print "i number= " + m + " carval= " + rc.cars\wheels Delay 100 Next Next
I want to return each element just once but via index number.
So for example I could print ALL the types from index (4) but only those. Rather than EACH element of the array.
If I try this:
Graphics 800,600,32,2 SetBuffer BackBuffer() Type cars Field wheels End Type Dim race.cars(100) For i=1 To 10 race(i)= New cars race(i)\wheels=Rand (4) Next For m=1 To 10 For rc(m).cars=Each cars Print "i number= " + m + " carval= " + rc(m).cars\wheels Delay 100 Next Next
I get, "Expecting variable assingment".
Darkheart