summaryrefslogtreecommitdiffstats
path: root/doc/expr.n
diff options
context:
space:
mode:
authorferrieux <ferrieux@users.sourceforge.net>2009-05-26 09:08:05 (GMT)
committerferrieux <ferrieux@users.sourceforge.net>2009-05-26 09:08:05 (GMT)
commit686a9ae36c1dd80c640cfd86c054fc097a9931d5 (patch)
treee9f8b9d1e47baa7763f196a521082ab1832167e9 /doc/expr.n
parent2c662b5c9124de8ddab0d178bb7950d3633b96b4 (diff)
downloadtcl-686a9ae36c1dd80c640cfd86c054fc097a9931d5.zip
tcl-686a9ae36c1dd80c640cfd86c054fc097a9931d5.tar.gz
tcl-686a9ae36c1dd80c640cfd86c054fc097a9931d5.tar.bz2
Fixed documentation of the right-associativity of the ** operator.
Diffstat (limited to 'doc/expr.n')
-rw-r--r--doc/expr.n14
1 files changed, 10 insertions, 4 deletions
diff --git a/doc/expr.n b/doc/expr.n
index b3c80cc..c9a81bb 100644
--- a/doc/expr.n
+++ b/doc/expr.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: expr.n,v 1.37 2008/10/17 10:22:25 dkf Exp $
+'\" RCS: @(#) $Id: expr.n,v 1.38 2009/05/26 09:08:05 ferrieux Exp $
'\"
.so man.macros
.TH expr n 8.5 Tcl "Tcl Built-In Commands"
@@ -206,14 +206,20 @@ produced by each operator.
The exponentiation operator promotes types like the multiply and
divide operators, and produces a result that is the same as the output
of the \fBpow\fR function (after any type conversions.)
-All of the binary operators group left-to-right within the same
-precedence level. For example, the command
+All of the binary operators but exponentiation group left-to-right
+within the same precedence level; exponentiation groups right-to-left. For example, the command
.PP
.CS
\fBexpr\fR {4*2 < 7}
.CE
.PP
-returns 0.
+returns 0, while
+.PP
+.CS
+\fBexpr\fR {2**3**2}
+.CE
+.PP
+returns 512.
.PP
The \fB&&\fR, \fB||\fR, and \fB?:\fR operators have
.QW "lazy evaluation" ,