summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-01-24 20:46:04 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-01-24 20:46:04 (GMT)
commitfb959134d9212901e350e0c651f4f463d6fb2cf9 (patch)
tree14eb980d00fd6cf3d4f33ec17257f527a1157f35
parent6f510c9f69dd0e053b819788e097a05db1f22c6e (diff)
downloadtcl-fb959134d9212901e350e0c651f4f463d6fb2cf9.zip
tcl-fb959134d9212901e350e0c651f4f463d6fb2cf9.tar.gz
tcl-fb959134d9212901e350e0c651f4f463d6fb2cf9.tar.bz2
Backport doc/eval.n from 9.0, and fix missing .CE
-rw-r--r--doc/eval.n15
1 files changed, 14 insertions, 1 deletions
diff --git a/doc/eval.n b/doc/eval.n
index 9fc2ae4..448a459 100644
--- a/doc/eval.n
+++ b/doc/eval.n
@@ -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)