Flushing any pending output to the specified channel

flush #

Flush any pending output to the specified channel


SYNTAX

flush #channel [, #channel] …

Flushes any pending output to the specified channel or channels.

channel

An integer value specifying the number of the channel to which data is to be flushed. It may be a constant, field name or expression.

Data is written to a sequential file by means of the put # command. The data is stored in an internal buffer, and is normally only output to the file itself when the internal buffer is full or when the file is closed (by means of the close # command). Each channel has its own buffer.

The effect of the flush # command is to write the current contents of the buffer out to the file immediately.

It is rarely necessary to use flush # while writing to an ordinary text file. The command becomes useful if the file is actually a device such as a till, and a command that does not end with the newline character is being sent to it.

NOTES

  • The Sculptor system variable sys.AutoFlush controls flushing to the screen. It does not affect channels.

  • The flush command is used to flush data to Sculptor keyed files.


EXAMPLE

flush #3, #9

RELATED TOPICS

Sequential files

put #

flushall