"Data" can be used for anything you want because it has the power to store strings and/or numbers. It can store a menu, inventory list, a drawing, planetary information, phone numbers, sprite information, anything that normal variables can store.
Check this example out:
` Make a box
ink rgb(0,255,0),0
box 0,0,15,15
` Grab the box as an image
get image 1,0,0,15,15,1
` Clear the screen
cls
` Starting x and y coordinates (these stay the same)
StartX=70
StartY=172
` Another set of x and y coordinates (these change)
x=StartX
y=StartY
` Go through all the data (the DataX and DataY represent
` the number of numbers across and down the data... just
` like an x and y coordinate on the screen)
for DataY=1 to 7
for DataX=1 to 25
` Read the data
read Num
` Paste image if the specific numbers are found in the data
if Num=1 or Num=2 or Num=5 or Num=9
paste image 1,x,y
endif
` Increase x to go to another grid spot (across)
inc x,20
next DataY
` Reset x to the starting x coordinate
x=StartX
` Increase y to go to another grid spot (down)
inc y,20
next DataX
wait key
end
` Data is usually placed at the bottom of the code
data 3,6,7,8,3,4,6,7,0,8,0,6,3,7,0,6,4,4,8,8,7,0,3,3,4
data 4,1,2,1,9,1,6,2,9,5,1,9,0,1,2,5,1,9,0,2,9,5,2,5,0
data 0,5,0,8,4,7,4,1,0,7,6,2,0,5,0,0,3,1,4,1,7,8,3,4,3
data 3,1,4,9,1,5,0,9,9,9,1,9,0,1,3,4,3,9,0,2,0,1,9,1,3
data 4,1,3,4,0,2,3,1,0,6,5,0,0,2,4,6,8,1,0,1,0,4,4,9,6
data 6,5,9,1,5,2,6,9,3,4,0,2,0,1,2,1,2,5,0,5,5,1,9,1,8
data 3,6,3,6,4,7,7,8,8,7,0,8,6,3,3,4,6,8,7,0,6,4,0,3,7
Can you guess what the data will reveal before running it?