in BASIC ROM:
|List of all BASIC keywords|
Typ: Command General Programming-Syntax: READ <variable> [,<variable>]
The BASIC-command READ is using for reading constant informations from DATA-lines into the indicated variable. It can be readed more constants with one READ-command also seperated through commas.
By using the wrong type of variable (for example read a char into a numerical variable like floating point or integer) the BASIC-error ?SYNTAX ERROR IN line occurr with a reference of corresponding DATA-line. When general used string variables for reading these BASIC-error can be avoided. When more constants are reading than data informations are written in the DATA-lines the BASIC-error ?OUT OF DATA IN Zeilennummer appear.
The BASIC-command RESTORE clear the pointer for the next DATA-constant. The next read begins by the first DATA-constant !
10 DATA 1,2,3,Apple,"Commodore 64" 20 READ A 30 READ B%, C, D$ 40 READ E$ 50 PRINT A, B%, C, D$, E$