GLBasic User Manual

Main sections

RESTORE

RESTORE label



The command "RESTORE label" is used to set the data reading position to the first element of the data block defined by "label". Subsequent READ commands will return the data from the reading position (and advance the reading position to the next item of data).

RESTORE name
READ a // returns 1
READ b // returns 2
READ a$, b$, c, d // returns "x", "y", 3, 4
PRINT a+", "+b+", "+a$+", "+b$+", "+c+", "+d, 0,0

SHOWSCREEN
MOUSEWAIT
READ xxx // Error - out of data

STARTDATA name:
    DATA 1,2
    DATA "x", "y", 3,4
ENDDATA


Output:
1, 2, x, y, 3, 4

See also...