1flush(n)                     Tcl Built-In Commands                    flush(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       flush - Flush buffered output for a channel
9

SYNOPSIS

11       flush channelId
12______________________________________________________________________________
13

DESCRIPTION

15       Flushes any output that has been buffered for channelId.
16
17       ChannelId must be an identifier for an open channel such as a Tcl stan‐
18       dard channel (stdout or stderr), the return value from an invocation of
19       open or socket, or the result of a channel creation command provided by
20       a Tcl extension.  The channel must have been opened for writing.
21
22       If the channel is in blocking mode the command does  not  return  until
23       all the buffered output has been flushed to the channel. If the channel
24       is in nonblocking mode, the command may return before all buffered out‐
25       put  has  been flushed; the remainder will be flushed in the background
26       as fast as the underlying file or device is able to absorb it.
27

EXAMPLE

29       Prompt for the user to type some information in on the console:
30
31              puts -nonewline "Please type your name: "
32              flush stdout
33              gets stdin name
34              puts "Hello there, $name!"
35

SEE ALSO

37       file(n), open(n), socket(n), Tcl_StandardChannels(3)
38

KEYWORDS

40       blocking, buffer, channel, flush, nonblocking, output
41
42
43
44Tcl                                   7.5                             flush(n)
Impressum