Think of a db array as a placeholder to a table of variables:
`this is an array with 2 dimensions
dim xyz#(1,3)
make object box 1,10,10,10
move camera -30
`these are variables:
x#=20
y#=-5
z#=0
position object 1,x#,y#,z#
`store these variables into places within an array
xyz#(1,1)=x#
xyz#(1,2)=y#
xyz#(1,3)=z#
sync on
do
`retrieve the variables from the array
x#=xyz#(1,1)
y#=xyz#(1,2)
z#=xyz#(1,3)
`do something with the extracted variables
position object 1,x#,y#,z#
move object 1,1
turn object left 1,3
`update the variables within the array with new positions
xyz#(1,1)=object position x(1)
xyz#(1,2)=object position y(1)
xyz#(1,3)=object position z(1)
`text the contents of the array (variables) to the screen
text 0,0,"x#="+str$(xyz#(1,1))+" y#="+str$(xyz#(1,2))+" z#="+str$(xyz#(1,3))
sync
loop
ZX Spectrum 48k Issue 3, Radio shack Tape drive, Rank arena 12" T.V. set.