in BASIC ROM:
|List of all BASIC keywords|
Typ: Command General Programming-Syntax: DATA <constant> [,<constant>]
The BASIC-Command DATA is used to store constant information in the program code, and is used with the BASIC-command READ. Each DATA-line can contain 1 or more constants separated by commas. Expressions containing variables etc. will not be evaluated here.
The information in DATA-lines will be read from left to right, beginning with the first DATA-line each time a READ instruction is executed. Chars can be written normally or in quotes, but chars like comma, space, colon, graphic chars or control characters must be written inside quotes as a string. The BASIC-command RESTORE resets the pointer of the next DATA-constant so that next READ will read from the first constant of the first DATA-line.
If READ is used with the wrong type of variable, the BASIC-error ?SYNTAX ERROR IN line occurs with a reference to the corresponding DATA-line.
10 DATA 1, 2, 3, Apple, "Commodore 64" 20 DATA "This ; is : a # test , or ? " 30 READ A, B%, C1, D$ 40 READ E$, F$ 50 PRINT A, B%, C, D$, E$ : PRINT F$