Clippy
Member

Posts: 84
|
 |
« Reply #4 on: May 05, 2010, 03:41:26 PM » |
|
Clear does NOT restore the DATA! If you have several DATA fields you can name them andv RESTORE the ones you need.
To name a DATA field use a line label:
MyData1:
DATA ,,,,,,,,,, DATA ,,,,,,,,,,, DATA ,,,,,,,,,,
When you READ the DATA you can restore that data field only:
RESTORE MyData
FOR i = 1 TO 20 'read 40 values using 2 variables READ nam$, age%, address$ NEXT
I advise placing all DATA fields after the main program code has ended. That way, you don't accidentally go to the wrong DATA fields.
|