< Futurebasic < Language < Reference
Syntax
READ DYNAMIC
Revised
May, 2001 (Release 5)
Description
Use READ DYNAMIC to read the contents of a dynamic array from a disk file. Before executing this read statement, you must dimension the dynamic array. The following example creates and fills a dynamic array, writes the array to disk, then reads it back into memory. FOR x = 1 TO 100
myAry(x) = x
NEXT OPEN "O",#1,"Dynamic Array Test"
WRITE DYNAMIC #1,myAry
CLOSE #1 KILL DYNAMIC myary
OPEN "I",#1,"Dynamic Array Test"
READ DYNAMIC #1,myAry
CLOSE #1 FOR x = 1 TO 10
PRINT myary(x)
NEXT KILL "Dynamic Array Test"
See Also
COMPRESS DYNAMIC, DYNAMIC, WRITE DYNAMIC
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.