summaryrefslogtreecommitdiffstats
path: root/doc/subst.n
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-10-26 20:11:50 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-10-26 20:11:50 (GMT)
commit6b9dd216db20bac6c76552a6193d67a01e1d34ee (patch)
treeb86166558de62f70eef1a7524fac75f7b47a4f44 /doc/subst.n
parent236c395276f8f1cf4d5b745ea490b4966e6eb148 (diff)
downloadtcl-6b9dd216db20bac6c76552a6193d67a01e1d34ee.zip
tcl-6b9dd216db20bac6c76552a6193d67a01e1d34ee.tar.gz
tcl-6b9dd216db20bac6c76552a6193d67a01e1d34ee.tar.bz2
* changes: Updated for 8.5b2 release.core_8_5_b2
* doc/*.1: Revert doc changes that broke * doc/*.3: `make html` so we can get the release * doc/*.n: out the door.
Diffstat (limited to 'doc/subst.n')
-rw-r--r--doc/subst.n52
1 files changed, 12 insertions, 40 deletions
diff --git a/doc/subst.n b/doc/subst.n
index 676beeb..34c82a9 100644
--- a/doc/subst.n
+++ b/doc/subst.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: subst.n,v 1.11 2007/10/26 12:25:06 dkf Exp $
+'\" RCS: @(#) $Id: subst.n,v 1.12 2007/10/26 20:11:53 dgp Exp $
'\"
.so man.macros
.TH subst n 7.4 Tcl "Tcl Built-In Commands"
@@ -56,9 +56,7 @@ will be substituted for that entire command or variable substitution
or any other return code is returned during command or variable
substitution, then the returned value is substituted for that
substitution. See the EXAMPLES below. In this way, all exceptional
-return codes are
-.QW caught
-by \fBsubst\fR. The \fBsubst\fR command
+return codes are ``caught'' by \fBsubst\fR. The \fBsubst\fR command
itself will either return an error, or will complete successfully.
.SH EXAMPLES
.PP
@@ -69,19 +67,13 @@ command substitutions) so the script
set a 44
\fBsubst\fR {xyz {$a}}
.CE
-returns
-.QW "\fBxyz {44}\fR" ,
-not
-.QW "\fBxyz {$a}\fR"
+returns ``\fBxyz {44}\fR'', not ``\fBxyz {$a}\fR''
and the script
.CS
-set a "p\e} q \e{r"
+set a "p\\} q \\{r"
\fBsubst\fR {xyz {$a}}
.CE
-return
-.QW "\fBxyz {p} q {r}\fR" ,
-not
-.QW "\fBxyz {p\e} q \e{r}\fR" .
+return ``\fBxyz {p} q {r}\fR'', not ``\fBxyz {p\\} q \\{r}\fR''.
.PP
When command substitution is performed, it includes any variable
substitution necessary to evaluate the script.
@@ -89,11 +81,7 @@ substitution necessary to evaluate the script.
set a 44
\fBsubst\fR -novariables {$a [format $a]}
.CE
-returns
-.QW "\fB$a 44\fR" ,
-not
-.QW "\fB$a $a\fR" .
-Similarly, when
+returns ``\fB$a 44\fR'', not ``\fB$a $a\fR''. Similarly, when
variable substitution is performed, it includes any command
substitution necessary to retrieve the value of the variable.
.CS
@@ -101,10 +89,7 @@ proc b {} {return c}
array set a {c c [b] tricky}
\fBsubst\fR -nocommands {[b] $a([b])}
.CE
-returns
-.QW "\fB[b] c\fR" ,
-not
-.QW "\fB[b] tricky\fR".
+returns ``\fB[b] c\fR'', not ``\fB[b] tricky\fR''.
.PP
The continue and break exceptions allow command substitutions to
prevent substitution of the rest of the command substitution and the
@@ -113,35 +98,22 @@ when processing text using \fIsubst\fR. For example, the script
.CS
\fBsubst\fR {abc,[break],def}
.CE
-returns
-.QW \fBabc,\fR ,
-not
-.QW \fBabc,,def\fR
-and the script
+returns ``\fBabc,\fR'', not ``\fBabc,,def\fR'' and the script
.CS
\fBsubst\fR {abc,[continue;expr {1+2}],def}
.CE
-returns
-.QW \fBabc,,def\fR ,
-not
-.QW \fBabc,3,def\fR .
+returns ``\fBabc,,def\fR'', not ``\fBabc,3,def\fR''.
.PP
Other exceptional return codes substitute the returned value
.CS
\fBsubst\fR {abc,[return foo;expr {1+2}],def}
.CE
-returns
-.QW \fBabc,foo,def\fR ,
-not
-.QW \fBabc,3,def\fR
-and
+returns ``\fBabc,foo,def\fR'', not ``\fBabc,3,def\fR'' and
.CS
\fBsubst\fR {abc,[return -code 10 foo;expr {1+2}],def}
.CE
-also returns
-.QW \fBabc,foo,def\fR ,
-not
-.QW \fBabc,3,def\fR .
+also returns ``\fBabc,foo,def\fR'', not ``\fBabc,3,def\fR''.
+
.SH "SEE ALSO"
Tcl(n), eval(n), break(n), continue(n)