DATA is used whan you have big amounts of data to store, in a linear way.
first, place a goto label:
@ANYTHING
then you place DATA statements
DATA 34, "Thomas", "Cake"
DATA can have any amount of variables in one command
then, to retrieve the data:
use
RESTORE @ANYTHING
then just a simple command to retrieve the data
READ AGE, NAME$, FOOD$
when you use this with multiple DATAs, the read command automatically goes one data forward
so, if you want to store a map made out of tiles with IDs, use this code:
DIM M(4,4)
@MAP
DATA 1,2,2,3
DATA 2,2,3,3
DATA 1,1,2,3
DATA 1,1,1,2
then
RESTORE @MAP
FOR I=0 TO 3
READ M(0,I), M(1,I), M(2,I), M(3,I)
NEXT
now you have converted the DATA block into an array