Restore Data

From Br Wiki
Jump to: navigation, search

In the internal list of values from DATA statements, the Restore Data statement moves the pointer to the first value in the specified line.

Comments and Examples

When a program assigns values with READ and DATA statements, the list of DATA statements may eventually become exhausted and generate an EOF error condition. RESTORE allows you to avoid this error by repositioning the data pointer at the beginning of the DATA statement's list of values. The specified line must, of course, contain a DATA statement.

Syntax

RESTORE [<line ref>]

Restore.png

Default

Restore to the first DATA statement in the program.

Parameters

The optional "line-ref" parameter specifies the line containing the DATA statement to which the pointer should be moved.

Technical Considerations

The RESTORE statement is ignored when the program contains no DATA statements.