DATA

SmallBASIC syntax groups: 


Data statement DATA


10
20  DATA constant1 [,constant2]…
30
Stores one or more constants, of any type, for subsequent access via READ command.


See examples


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

DATA commands are non executable statements that supply a stream of data constants for use by READ commands. All the items supplied by all the DATA commands in a program make up one continuous “string” of information that is accessed in order by your program’s READ commands.

RESTORE MyDataBlock
FOR I=1 TO 3
    READ v
    PRINT v
NEXT
END
...
LABEL MyDataBlock
DATA 1,2,3