Restore Data: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
(Created page with "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 Exam...")
 
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:


===Syntax===
===Syntax===
RESTORE [<[[line ref]]>]
[[Image:Restore.png]]
[[Image:Restore.png]]



Latest revision as of 17:27, 5 May 2014

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>]

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.