Jump to content

Futurebasic/Language/Reference/read dynamic

From Wikibooks, open books for an open world

Syntax

[edit | edit source]

READ DYNAMIC

Revised

[edit | edit source]

May, 2001 (Release 5)

Description

[edit | edit source]

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

[edit | edit source]

COMPRESS DYNAMIC, DYNAMIC, WRITE DYNAMIC