411 REFERENCE · Wikibooks
Futurebasic/Language/Reference/write dynamic
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
WRITE DYNAMIC
statement
Syntax
WRITE DYNAMIC deviceID,arrayName
Revised
May, 2001 (Release 5)
Description
Use WRITE DYNAMIC to send the contents of a dynamic array to a disk file. Data written to a file in this manner can be read back into memory using READ DYNAMIC. Before dynamic arrays are written to the disk, they are automatically compressed.
Example
DIM x
DYNAMIC myAry(_maxLong)
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; READ DYNAMIC; WRITE DYNAMIC