diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-27 14:24:37 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-27 14:24:37 (GMT) |
commit | f2710bf0bb0c6ace5d1bc4f424b400537ffdb21c (patch) | |
tree | c19b22fbb2165682630fecbf3779e53b26c9002f /doc/subst.n | |
parent | 4c2d0f20bfa9108949678cf49bfdc58eedc7bb93 (diff) | |
download | tcl-f2710bf0bb0c6ace5d1bc4f424b400537ffdb21c.zip tcl-f2710bf0bb0c6ace5d1bc4f424b400537ffdb21c.tar.gz tcl-f2710bf0bb0c6ace5d1bc4f424b400537ffdb21c.tar.bz2 |
More minor doc fixes
Diffstat (limited to 'doc/subst.n')
-rw-r--r-- | doc/subst.n | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/doc/subst.n b/doc/subst.n index 829b077..7309515 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.5 2002/04/18 16:31:40 dgp Exp $ +'\" RCS: @(#) $Id: subst.n,v 1.6 2004/10/27 14:24:37 dkf Exp $ '\" .so man.macros .TH subst n 7.4 Tcl "Tcl Built-In Commands" @@ -66,31 +66,31 @@ When it performs its substitutions, \fIsubst\fR does not give any special treatment to double quotes or curly braces (except within command substitutions) so the script .CS -\fBset a 44 -subst {xyz {$a}}\fR +set a 44 +\fBsubst\fR {xyz {$a}} .CE returns ``\fBxyz {44}\fR'', not ``\fBxyz {$a}\fR'' .VS 8.4 and the script .CS -\fBset a "p\\} q \\{r" -subst {xyz {$a}}\fR +set a "p\\} q \\{r" +\fBsubst\fR {xyz {$a}} .CE 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. .CS -\fBset a 44 -subst -novariables {$a [format $a]}\fR +set a 44 +\fBsubst\fR -novariables {$a [format $a]} .CE 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 -\fBproc b {} {return c} +proc b {} {return c} array set a {c c [b] tricky} -subst -nocommands {[b] $a([b])}\fR +\fBsubst\fR -nocommands {[b] $a([b])} .CE returns ``\fB[b] c\fR'', not ``\fB[b] tricky\fR''. .PP @@ -99,21 +99,21 @@ prevent substitution of the rest of the command substitution and the rest of \fIstring\fR respectively, giving script authors more options when processing text using \fIsubst\fR. For example, the script .CS -\fBsubst {abc,[break],def}\fR +\fBsubst\fR {abc,[break],def} .CE returns ``\fBabc,\fR'', not ``\fBabc,,def\fR'' and the script .CS -\fBsubst {abc,[continue;expr 1+2],def}\fR +\fBsubst\fR {abc,[continue;expr 1+2],def} .CE returns ``\fBabc,,def\fR'', not ``\fBabc,3,def\fR''. .PP Other exceptional return codes substitute the returned value .CS -\fBsubst {abc,[return foo;expr 1+2],def}\fR +\fBsubst\fR {abc,[return foo;expr 1+2],def} .CE returns ``\fBabc,foo,def\fR'', not ``\fBabc,3,def\fR'' and .CS -\fBsubst {abc,[return -code 10 foo;expr 1+2],def}\fR +\fBsubst\fR {abc,[return -code 10 foo;expr 1+2],def} .CE also returns ``\fBabc,foo,def\fR'', not ``\fBabc,3,def\fR''. .VE |