Tcl Source Code

View Ticket
Login
Ticket UUID: 1631364
Title: lindex behaves strangely
Type: Bug Created on: 2007-01-09 10:38:45
Submitter: mpc_janssen Assigned to: dkf
Subsystem: 47. Bytecode Compiler Severity:
Priority: 9 Immediate Last modified: 2007-01-09 18:34:13
Status: Closed Closed by: dkf
Resolution: Fixed Closed on: 2007-01-09 11:34:13
Version: obsolete: 8.5a6
Description:
I am testing on 85a6 where lindex is behaving rather strangely. See the following interactive session

() 24 % lindex 0 "a b"
a
() 25 % lindex "a b" 0
a

So it seems the order of arguments can be reversed.
This leads to problems:

) 27 % lindex 1 0 ; # expected to return 1
() 28 % lindex [list 1] 0
1
() 29 %
User Comments:
dkf added on 2007-01-09 18:34:13:
Logged In: YES 
user_id=79902
Originator: NO

It was a mistake I made in the [lindex] compiler.