QBasic 1.1: DATA Statement

Syntax

DATA constant[,constant]...
READ variablelist
RESTORE [line]

Description / Parameter(s)

constant One or more numeric or string constants specifying the data to be read. String constants containing commas, colons, or leading or trailing spaces are enclosed in quotation marks (" ").
variablelist One or more variables, separated by commas, that are assigned data values. Variable names can consist of up to 40 characters and must begin with a letter. Valid characters are A-Z, 0-9, and period (.).
line The label or line number of a DATA statement. If line is omitted, the next READ statement reads values in the first DATA statement in the program.
DATA statements can be entered only at the module level. They cannot be used in procedures.

Example

FOR i% = 1 TO 3 READ a%, b$ PRINT a%, b$ RESTORE NEXT i% DATA 1, "Repeat"