Instead of TREE01, TREE02, do this: VAR TREES%[30,2] 'integer type, 30 trees by 2 variables FOR I%=0 TO 29 TREES%[I%,0]=RND(200) 'X TREES%[I%,1]=RND(200) 'Y NEXT