summaryrefslogtreecommitdiffstats
path: root/doc/fileevent.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/fileevent.n')
-rw-r--r--doc/fileevent.n15
1 files changed, 6 insertions, 9 deletions
diff --git a/doc/fileevent.n b/doc/fileevent.n
index 8e82564..73f2104 100644
--- a/doc/fileevent.n
+++ b/doc/fileevent.n
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: fileevent.n,v 1.5 2001/09/27 05:50:56 andreas_kupries Exp $
+'\" RCS: @(#) $Id: fileevent.n,v 1.5.6.1 2004/10/27 12:52:40 dkf Exp $
'\"
.so man.macros
.TH fileevent n 7.5 Tcl "Tcl Built-In Commands"
@@ -100,21 +100,18 @@ If an error occurs while executing the script then the
In addition, the file event handler is deleted if it ever returns
an error; this is done in order to prevent infinite loops due to
buggy handlers.
-
.SH EXAMPLE
-.PP
+In this setup \fBGetData\fR will be called with the channel as an
+argument whenever $chan becomes readable.
.CS
- proc GetData {chan} {
+proc GetData {chan} {
if {![eof $chan]} {
puts [gets $chan]
}
- }
-
- fileevent $chan readable [list GetData $chan]
+}
+\fBfileevent\fR $chan readable [list GetData $chan]
.CE
-In this setup \fBGetData\fR will be called with the channel as an
-argument whenever $chan becomes readable.
.SH CREDITS
.PP