From 686a9ae36c1dd80c640cfd86c054fc097a9931d5 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Tue, 26 May 2009 09:08:05 +0000 Subject: Fixed documentation of the right-associativity of the ** operator. --- ChangeLog | 5 +++++ doc/expr.n | 14 ++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index e53961f..78c0bba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-05-26 Alexandre Ferrieux + + * doc/expr.n: Fixed documentation of the right-associativity of + the ** operator. + 2009-05-14 Donal K. Fellows * generic/tclOOInfo.c (InfoObjectNsCmd): Added introspection mechanism 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" , -- cgit v0.12