Flush Command

Purpose

Clears the buffers for this file and causes all buffered data to be written to the file.

Syntax

Flush #n

n: iexp

Description

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.

Example

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

Remarks

Flush is automatically called for Lock and Unlock.

See Also

Commit, Open, Lock

{Created by Sjouke Hamstra; Last updated: 06/10/2014 by James Gaite}