Skip to content
Tcl Source Code View Ticket
Login

View Ticket

lindex behaves strangely

Closed / Fixed1631364fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 20 years ago
Descriptionplain2007-01-09 10:38:45
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 %
dkfplain2007-01-09 18:34:13
Logged In: YES 
user_id=79902
Originator: NO

It was a mistake I made in the [lindex] compiler.
Log in (anonymous is fine) to add a comment.