FutureBasic Logo

<<    Index    >> FutureBasic

write dynamic   statement



Syntax
write dynamic deviceID, arrayName

Description
write dynamic sends the contents of a dynamic array to an open disk file. Data written to a file in this manner can be read back into memory with read dynamic.

Example
dim as FSSpec fs
dim as long j
dynamic myAry(_maxLong) as long
fn FSMakeFSSpec( system( _aplVRefNum ), system( _aplParID ), "Test", @fs )
for j = 0 to 9
myAry(j) = j
next
open "O", 1, @fs
write dynamic 1, myAry
close 1
kill dynamic myAry
open "I", 1, @fs
read dynamic 1, myAry
close 1
for j = 0 to 9
print myAry(j)
next
FSpDelete( fs )

See also
dynamic; read dynamic