
|
<<
Index
>>
|
FutureBasic
|
read dynamic
|
|
statement
|
|
Syntax
read dynamic deviceID, arrayName
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.
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
dynamic; write dynamic