diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-27 12:53:22 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-27 12:53:22 (GMT) |
commit | 4c2d0f20bfa9108949678cf49bfdc58eedc7bb93 (patch) | |
tree | b3ce80d2f183dc1bd02185c2bf44738b4377c9ed /doc/fileevent.n | |
parent | cd7e7ec95e76bcb5bf66d7cc9e6d60aad70dba07 (diff) | |
download | tcl-4c2d0f20bfa9108949678cf49bfdc58eedc7bb93.zip tcl-4c2d0f20bfa9108949678cf49bfdc58eedc7bb93.tar.gz tcl-4c2d0f20bfa9108949678cf49bfdc58eedc7bb93.tar.bz2 |
More minor doc fixes
Diffstat (limited to 'doc/fileevent.n')
-rw-r--r-- | doc/fileevent.n | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/doc/fileevent.n b/doc/fileevent.n index 8e82564..f5ac7fc 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.6 2004/10/27 12:53:22 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 |