LoginLogin

How do you store an array within an array?

Root / Programming Questions / [.]

HarionagoCreated:
If I had an array like
DIM POS [2]
How would I store that if I wanted to make a list of 10 of them? Perhaps this will keep track of 10 enemy positions on the screen.

I guess you could just use a 2-dimensional array, in your case:
DIM ALL_POS [10,2]

I am right it thinking this would store it like so - 00 00 00 00 and so on Told get the third position I would call
var x = ALL_POS [2,0] 
var y =  ALL_POS [2,1] 
Does that sound right?

Jup, this should solve your problem.