summaryrefslogtreecommitdiffstats
path: root/doc/update.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-10-27 14:43:09 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-10-27 14:43:09 (GMT)
commit4955bdc67b8a5c3d9d12cf70cfe0b73c8a4f4ca8 (patch)
tree7a733c8f49dc66ae55cca35e7652f5bb0b1c51c6 /doc/update.n
parent45beb64f7dcb09a6ce83532702bca760f72e6f4d (diff)
downloadtcl-4955bdc67b8a5c3d9d12cf70cfe0b73c8a4f4ca8.zip
tcl-4955bdc67b8a5c3d9d12cf70cfe0b73c8a4f4ca8.tar.gz
tcl-4955bdc67b8a5c3d9d12cf70cfe0b73c8a4f4ca8.tar.bz2
Finished user-level documentation backport
Diffstat (limited to 'doc/update.n')
-rw-r--r--doc/update.n18
1 files changed, 17 insertions, 1 deletions
diff --git a/doc/update.n b/doc/update.n
index 87c2a7d..162c859 100644
--- a/doc/update.n
+++ b/doc/update.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: update.n,v 1.4 2000/09/07 14:27:52 poenitz Exp $
+'\" RCS: @(#) $Id: update.n,v 1.4.18.1 2004/10/27 14:43:15 dkf Exp $
'\"
.so man.macros
.TH update n 7.5 Tcl "Tcl Built-In Commands"
@@ -43,6 +43,22 @@ you are performing a long-running computation but you still want
the application to respond to events such as user interactions; if
you occasionally call \fBupdate\fR then user input will be processed
during the next call to \fBupdate\fR.
+.SH EXAMPLE
+Run computations for about a second and then finish:
+.CS
+set x 1000
+set done 0
+after 1000 set done 1
+while {!$done} {
+ # A very silly example!
+ set x [expr {log($x) ** 2.8}]
+
+ # Test to see if our time-limit has been hit. This would
+ # also give a chance for serving network sockets and, if
+ # the Tk package is loaded, updating a user interface.
+ \fBupdate\fR
+}
+.CE
.SH "SEE ALSO"
after(n), bgerror(n)