Flush Statement

Writes a file's buffer into the file.

Syntax
Flush #fileNumber

Parameters

fileNumber
Specify an integer value from 30 to 63 or an expression.

Description
Writes a file's buffer into the specified file.

Flush cannot be used if the file was opened with ROpen.

Flush Statement Example

Integer fileNum, i

fileNum = FreeFile
UOpen "TEST.DAT" As #fileNum
For i = 0 To 100
   Print #fileNum, i
Next i
Flush #fileNum
Close #fileNum