Contents  Index  
──────────────────────────────────────────────────────────────────────────────
DATA specifies values to be read by subsequent READ statements.
READ reads those values and assigns them to variables.
RESTORE allows READ to reread values in specified DATA statements.

DATA constant[,constant]...
READ variablelist
RESTORE [line]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"
──────────────────────────────────────────────────────────────────────────────
 © Copyright Microsoft Corporation, 1987-1992. All rights reserved.
   Converted from qbasic.hlp with DosHelp/HelpConvert