RESTORE @MYDATA
FOR I=1 TO 2 'loop twice
VAR A,B,C$
READ A,B,C$ 'read the next 3 values
'if C$ was not a string, it would give an error since the value in the data is a string and C is not
PRINT C$ 'print the string we just read
NEXT
'if we added one more READ A at the end of the loop it would give an error because there is no more data left
END
@MYDATA
DATA 1,2,"HELLO"
DATA 3,4,"WORLD"
There is a hidden cursor (pointer) to the current position in the data, calling RESTORE resets that data cursor back to the beginning
Is this what you were looking for?
Using the DATA command?