Index: fileevent.n
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/fileevent.n,v
retrieving revision 1.3
diff -u -r1.3 fileevent.n
--- fileevent.n	2000/09/07 14:27:47	1.3
+++ fileevent.n	2001/09/26 16:29:53
@@ -96,6 +96,21 @@
 an error;  this is done in order to prevent infinite loops due to
 buggy handlers.
 
+.SH EXAMPLE
+.PP
+.CS
+\fBproc GetData { chan } {
+    if { ! [ eof $chan ] } {
+        puts [ gets $chan ]
+    }
+}
+
+fileevent $chan readable [list GetData $chan]
+\fR
+.CE
+This calls GetData with the channel as an argument whenever $chan
+becomes readable.
+
 .SH CREDITS
 .PP
 \fBfileevent\fR is based on the \fBaddinput\fR command created
