Tcl Source Code

Check-in [559d647aca]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove the obsolete form of the [trace] command from the documentation.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | am-trace-ensemble
Files: files | file ages | folders
SHA3-256: 559d647acaf00e9394d4fe084e1003d4008b02653ef9c8f38a9aeb2aa4ca18d2
User & Date: arjenmarkus 2018-05-08 17:51:56
Context
2018-12-03
20:32
Turn the trace command into an ensemble, removing the old obsolete forms of the command. This had c... Leaf check-in: 24937d8596 user: arjenmarkus tags: am-trace-ensemble
2018-05-08
17:51
Remove the obsolete form of the [trace] command from the documentation. check-in: 559d647aca user: arjenmarkus tags: am-trace-ensemble
17:38
Changes to the code: remove the macro "TCL_REMOVE_OBSOLETE_TRACES" and associated code. Turn the [t... check-in: 32e489acdc user: arjenmarkus tags: am-trace-ensemble
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to doc/trace.n.

350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
\fBtrace info variable\fI name\fR
Returns a list containing one element for each trace currently set on
variable \fIname\fR.  Each element of the list is itself a list
containing two elements, which are the \fIopList\fR and \fIcommandPrefix\fR
associated with the trace.  If \fIname\fR does not exist or does not
have any traces set, then the result of the command will be an empty
string.
.RE
.PP
For backwards compatibility, three other subcommands are available:
.RS
.TP
\fBtrace variable \fIname ops command\fR
This is equivalent to \fBtrace add variable \fIname ops command\fR.
.TP
\fBtrace vdelete \fIname ops command\fR
This is equivalent to \fBtrace remove variable \fIname ops command\fR
.TP
\fBtrace vinfo \fIname\fR
This is equivalent to \fBtrace info variable \fIname\fR
.RE
.PP
These subcommands are deprecated and will likely be removed in a
future version of Tcl.  They use an older syntax in which \fBarray\fR,
\fBread\fR, \fBwrite\fR, \fBunset\fR are replaced by \fBa\fR, \fBr\fR,
\fBw\fR and \fBu\fR respectively, and the \fIops\fR argument is not a
list, but simply a string concatenation of the operations, such as
\fBrwua\fR.
.SH EXAMPLES
.PP
Print a message whenever either of the global variables \fBfoo\fR and
\fBbar\fR are updated, even if they have a different local name at the
time (which can be done with the \fBupvar\fR command):
.PP
.CS






<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







350
351
352
353
354
355
356





















357
358
359
360
361
362
363
\fBtrace info variable\fI name\fR
Returns a list containing one element for each trace currently set on
variable \fIname\fR.  Each element of the list is itself a list
containing two elements, which are the \fIopList\fR and \fIcommandPrefix\fR
associated with the trace.  If \fIname\fR does not exist or does not
have any traces set, then the result of the command will be an empty
string.





















.SH EXAMPLES
.PP
Print a message whenever either of the global variables \fBfoo\fR and
\fBbar\fR are updated, even if they have a different local name at the
time (which can be done with the \fBupvar\fR command):
.PP
.CS