← All lessonsLESSON 711 lines
LESSON 7 OF 13
DATA AND READ
Keeping a table of facts inside the program.
DATAREADRESTORETAB
DATA lines hold a list of values — numbers or words — separated by commas. They can go anywhere in the program; the computer skips over them when running. READ A$,B takes the next two values off the list, in order.
RESTORE puts the pointer back to the first DATA item so you can read the list again. Reading past the end gives ?OUT OF DATA ERROR.
TAB(14) in a PRINT moves the cursor to column 14, which is how you line things up in columns.
Type with the keyboard under the screen, or tap the blue screen to use your phone's own keyboard. While a program runs, keys go to INPUT and GET. When it says READY., type a line and press RETURN to run it straight away.