TYPE 2 object collections of same TYPE

BlitzPlus Forums/BlitzPlus Programming/TYPE 2 object collections of same TYPE

Try this code
Why is x\x the same as w\x I would like them not to be the same. I want to create two independent collections of the same TYPE. Who do you do that
Can anybody help?


Type CHAIR
Field x, y
End Type

w.chair = New chair
w\x = 5226
test()
renderworld()
WaitKey
End
;-------------------------------
Function test()
For w.chair = Each chair
Print "test"
w\x = w\x + 1
Next
End Function



Function renderworld()

For x.chair = Each chair
; do you think the following statement will executed.
Print "renderworld"
Print x\x
Next

End Function