summaryrefslogtreecommitdiffstats
path: root/doc/ParseCmd.3
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2006-08-09 10:06:28 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2006-08-09 10:06:28 (GMT)
commit99218e86bcf6d184ccf51155c312d298a5d82b07 (patch)
treee3746121f114a149427f88ebfe84850a5ae43702 /doc/ParseCmd.3
parenta15358050ba135ab39f8fa94adbd1584fb657ffa (diff)
downloadtcl-99218e86bcf6d184ccf51155c312d298a5d82b07.zip
tcl-99218e86bcf6d184ccf51155c312d298a5d82b07.tar.gz
tcl-99218e86bcf6d184ccf51155c312d298a5d82b07.tar.bz2
Make [expr] use in examples more idiomatic [Bug 1526581]
Diffstat (limited to 'doc/ParseCmd.3')
-rw-r--r--doc/ParseCmd.38
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/ParseCmd.3 b/doc/ParseCmd.3
index 921ba22..b49f839 100644
--- a/doc/ParseCmd.3
+++ b/doc/ParseCmd.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ParseCmd.3,v 1.22 2005/09/15 23:13:32 msofer Exp $
+'\" RCS: @(#) $Id: ParseCmd.3,v 1.23 2006/08/09 10:06:28 dkf Exp $
'\"
.so man.macros
.TH Tcl_ParseCommand 3 8.3 Tcl "Tcl Library Procedures"
@@ -135,7 +135,7 @@ an error message is left in \fIinterp\fR's result,
and no information is left at \fI*parsePtr\fR or \fI*termPtr\fR.
.PP
\fBTcl_ParseQuotedString\fR parses a double-quoted string such as
-\fB"sum is [expr $a+$b]"\fR
+\fB"sum is [expr {$a+$b}]"\fR
from the beginning of the argument \fIstart\fR.
The first character of \fIstart\fR must be \fB"\fR.
If the double-quoted string was parsed successfully,
@@ -151,7 +151,7 @@ an error message is left in \fIinterp\fR's result,
and no information is left at \fI*parsePtr\fR or \fI*termPtr\fR.
.PP
\fBTcl_ParseVarName\fR parses a Tcl variable reference such as
-\fB$abc\fR or \fB$x([expr $index + 1])\fR from the beginning of its
+\fB$abc\fR or \fB$x([expr {$index + 1}])\fR from the beginning of its
\fIstart\fR argument.
The first character of \fIstart\fR must be \fB$\fR.
If a variable name was parsed successfully, \fBTcl_ParseVarName\fR
@@ -163,7 +163,7 @@ error message is left in \fIinterp\fR's result (if \fIinterp\fR isn't
NULL), and no information is left at \fI*parsePtr\fR.
.PP
\fBTcl_ParseVar\fR parse a Tcl variable reference such as \fB$abc\fR
-or \fB$x([expr $index + 1])\fR from the beginning of its \fIstart\fR
+or \fB$x([expr {$index + 1}])\fR from the beginning of its \fIstart\fR
argument. The first character of \fIstart\fR must be \fB$\fR. If
the variable name is parsed successfully, \fBTcl_ParseVar\fR returns a
pointer to the string value of the variable. If an error occurs while