SmallBASIC syntax groups: 

Data command READ

20  READ var[, var …]
Assigns values in DATA items to specified variables.

See examples

If there is insufficient information on this page and you wish learn more about READ, please send an email to You can help to improve information about READ by submitting an article using the comments link below. Note, an offline language reference text file is now avialable – see the Download section.

  • var – Any variable.

Unless a RESTORE command is executed, SmallBASIC moves to the next DATA item with each READ assignment. If SmallBASIC runs out of DATA items to READ, an run-time error occurs.

FOR c=1 TO 6
    READ x
    PRINT x
DATA "a,b,c", 2
DATA 3, 4
DATA "fifth", 6