diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-01-24 20:46:04 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-01-24 20:46:04 (GMT) |
commit | 0521de9b5777f68690ef626944e3fa41be4bb254 (patch) | |
tree | 14eb980d00fd6cf3d4f33ec17257f527a1157f35 /doc/eval.n | |
parent | 698ba502d68245a088b9d56c3ce0d8bf995ee541 (diff) | |
download | tcl-0521de9b5777f68690ef626944e3fa41be4bb254.zip tcl-0521de9b5777f68690ef626944e3fa41be4bb254.tar.gz tcl-0521de9b5777f68690ef626944e3fa41be4bb254.tar.bz2 |
Backport doc/eval.n from 9.0, and fix missing .CE
Diffstat (limited to 'doc/eval.n')
-rw-r--r-- | doc/eval.n | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -23,7 +23,14 @@ fashion as the \fBconcat\fR command, passes the concatenated string to the Tcl interpreter recursively, and returns the result of that evaluation (or any error generated by it). Note that the \fBlist\fR command quotes sequences of words in such a -way that they are not further expanded by the \fBeval\fR command. +way that they are not further expanded by the \fBeval\fR command; +for \fIany\fR values, $a, $b, and $c, these two lines are effectively +equivalent: +.PP +.CS +\fBeval\fR [list $a $b $c] +$a $b $c +.CE .SH EXAMPLES .PP Often, it is useful to store a fragment of a script in a variable and @@ -74,6 +81,12 @@ However, the last line would now normally be written without .CS set var [linsert $var 0 {*}$args] .CE +.PP +or indeed like this: +.PP +.CS +set var [list {*}$args {*}$var] +.CE .SH "SEE ALSO" catch(n), concat(n), error(n), errorCode(n), errorInfo(n), interp(n), list(n), namespace(n), subst(n), uplevel(n) |