summaryrefslogtreecommitdiffstats
ModeNameSize
d---------.azure-pipelines385logstatsplain
d---------.devcontainer83logstatsplain
-rw-r--r--.editorconfig181logstatsplain
-rw-r--r--.gitattributes3315logstatsplain
d---------.github335logstatsplain
-rw-r--r--.gitignore2669logstatsplain
-rw-r--r--.mailmap175logstatsplain
-rw-r--r--.pre-commit-config.yaml181logstatsplain
-rw-r--r--.readthedocs.yml389logstatsplain
d---------Doc1067logstatsplain
d---------Grammar73logstatsplain
d---------Include2969logstatsplain
-rw-r--r--LICENSE13936logstatsplain
d---------Lib7413logstatsplain
d---------Mac332logstatsplain
-rw-r--r--Makefile.pre.in107174logstatsplain
d---------Misc882logstatsplain
d---------Modules5502logstatsplain
d---------Objects2545logstatsplain
d---------PC1594logstatsplain
d---------PCbuild6073logstatsplain
d---------Parser579logstatsplain
d---------Programs390logstatsplain
d---------Python3563logstatsplain
-rw-r--r--README.rst10043logstatsplain
d---------Tools786logstatsplain
-rw-r--r--aclocal.m424436logstatsplain
-rwxr-xr-xconfig.guess49348logstatsplain
-rwxr-xr-xconfig.sub35276logstatsplain
-rwxr-xr-xconfigure868846logstatsplain
-rw-r--r--configure.ac233364logstatsplain
-rwxr-xr-xinstall-sh15358logstatsplain
-rw-r--r--pyconfig.h.in53194logstatsplain
Exp $ '\" .so man.macros .TH unknown n "" Tcl "Tcl Built-In Commands" @@ -71,6 +71,20 @@ auto-exec step is skipped. Under normal circumstances the return value from \fBunknown\fR is the return value from the command that was eventually executed. +.SH EXAMPLE +Arrange for the \fBunknown\fR command to have its standard behavior +except for first logging the fact that a command was not found: +.PP +.CS +# Save the original one so we can chain to it +rename \fBunknown\fR _original_unknown + +# Provide our own implementation +proc \fBunknown\fR args { + puts stderr "WARNING: unknown command: $args" + uplevel 1 [list _original_unknown {expand}$args] +} +.CE .SH "SEE ALSO" info(n), proc(n), interp(n), library(n) diff --git a/doc/unset.n b/doc/unset.n index e68c3f2..47124e9 100644 --- a/doc/unset.n +++ b/doc/unset.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: unset.n,v 1.5.18.1 2004/05/07 22:29:05 msofer Exp $ +'\" RCS: @(#) $Id: unset.n,v 1.5.18.2 2004/10/27 14:43:15 dkf Exp $ '\" .so man.macros .TH unset n 8.4 Tcl "Tcl Built-In Commands" @@ -39,9 +39,30 @@ If an error occurs, any variables after the named one causing the error not deleted. An error can occur when the named variable doesn't exist, or the name refers to an array element but the variable is a scalar, or the name refers to a variable in a non-existent namespace. +.SH EXAMPLE +Create an array containing a mapping from some numbers to their +squares and remove the array elements for non-prime numbers: +.CS +array set squares { + 1 1 6 36 + 2 4 7 49 + 3 9 8 64 + 4 16 9 81 + 5 25 10 100 +} + +puts "The squares are:" +parray squares + +\fBunset\fR squares(1) squares(4) squares(6) +\fBunset\fR squares(8) squares(9) squares(10) + +puts "The prime squares are:" +parray squares +.CE .SH "SEE ALSO" -set(n), trace(n), unset(n) +set(n), trace(n), upvar(n) .SH KEYWORDS remove, variable 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) diff --git a/doc/uplevel.n b/doc/uplevel.n index 0d3bf6e..df4db5b 100644 --- a/doc/uplevel.n +++ b/doc/uplevel.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: uplevel.n,v 1.3 2000/09/07 14:27:52 poenitz Exp $ +'\" RCS: @(#) $Id: uplevel.n,v 1.3.18.1 2004/10/27 14:43:15 dkf Exp $ '\" .so man.macros .TH uplevel n ""