Tcl Source Code

View Ticket
Login
Ticket UUID: 1556802
Title: [TIP#274] right associativity for ** operator
Type: Patch Created on: 2006-09-12 03:18:39
Submitter: dgp Assigned to: dgp
Subsystem: 45. Parsing and Eval Severity:
Priority: 5 Medium Last modified: 2006-11-05 10:29:47
Status: Closed Closed by: dgp
Resolution: Accepted Closed on: 2006-11-05 03:29:47
Version: TIP Implementation
Description:
David Smith has observed on
the tcl-core mailing list that
left associativity of the **
operator proposed by TIP 123
and implemented in current
devlopment sources of Tcl
is at odds with several other
languages and computing 
environments.

Attached is a patch that changes
** to right associativity.  Here
it is in action:

% expr 2**3**4
2417851639229258349412352

I note that there are zero tests
in the test suite checking the
associativity of **, which I take
as evidence that the original
left-associative implementation choice
wasn't a feature of great importance.
User Comments:
dgp added on 2006-09-12 10:18:39:

File Added - 193061: expon.patch

dgp added on 2006-11-05 10:29:47:
Logged In: YES 
user_id=80530


TIP 274 Accepted.
Patch committed.

Attachments: