READ
This page was last modified 02:26, 16 May 2020 by Gdx. Based on work by Mars2000you and NYYRIKKI.

Contents

Effect

Returns next value(s) that has been stored in to program source by using DATA statements.

Syntax

READ <Variable>,<Variable>...

Note: Parameters can not end with a comma alone.

Parameter

<Variable> is a variable that matches with the datatype stored in DATA statement.

After READ instruction is executed the data pointer will automatically move to next item. Data pointer can be moved manually by using RESTORE instruction.

Example

10 READ A$
20 PRINT A$
30 READ A,B
40 PRINT A
50 PRINT B
60 DATA "TEST",10,20
 
RUN
TEST
 10
 20

Related to

DATA, DIM, RESTORE

Compatibility

MSX-BASIC 1.0 or higher