what's wrong with DIm arrays? I mean, searching for the cube that has index 7...somewhat inefficient.
so...
cube(7)
replaces:
c.cube = first cube
counter = 0
repeat
counter = counter + 1
c = after c
if c.cube = null then runtimeerror("Does not exist")
until counter = 7
Graphics3D 800,600 cam=CreateCamera() PositionEntity cam,0,0,10 light=CreateLight() dim cube(199) For i=0 To 199 cube=createcube() positionentity cube(i),10,0,i*5 Next While Not KeyHit(1) turnentity cube(7),0,.1,0 RenderWorld() Flip Wend
so...
cube(7)
replaces:
c.cube = first cube
counter = 0
repeat
counter = counter + 1
c = after c
if c.cube = null then runtimeerror("Does not exist")
until counter = 7