Clears the buffers for this file and causes all buffered data to be written to the file.
Flush #n
n: iexp
The command Flush writes the contents of a GFA-BASIC 32 file buffer to the file. This does not mean, that the data will be written to disk immediately, the data is buffered by the OS. It will (probably) be transferred through the cable to the other networked computer.
The Commit (to-disk) command lets you ensure that critical data is written directly to disk rather than to the operating system buffers.
Open App.Path & "\test.sav" for Output As # 1
Print # 1; "Save Data"
Flush # 1
Close # 1
Kill App.Path & "\test.sav" // Tidy-up line
Flush is automatically called for Lock and Unlock.
{Created by Sjouke Hamstra; Last updated: 06/10/2014 by James Gaite}