Overview
| Artifact ID: | bf289603582eb10541be6077561a0b8ed878dd7e |
|---|---|
| Ticket: | 1718580fffffffffffffffffffffffffffffffff
[lindex] accepts bad index |
| User & Date: | lars_h on 2007-05-14 12:21:25 |
Changes
- assignee changed to: "dkf"
- cmimetype changed to: "text/plain"
- comment changed to:
Mistyping [lindex] where I meant [linsert], I discovered the following behaviour: [lindex {} end foo] does not throw an error, whereas [lindex {} foo] does! Or as an example session: % info patchlevel 8.5a6 % lindex {} foo bad index "foo": must be integer?[+-]integer? or end?[+-]integer? % lindex {} end foo % lindex a end foo bad index "foo": must be integer?[+-]integer? or end?[+-]integer? % lindex {} 0 foo % lindex {} -1 foo % lindex {} foo foo bad index "foo": must be integer?[+-]integer? or end?[+-]integer? This is probably due to lines 1108-1115 of tclListObj.c (v 1.46): once an out-of-bounds index is encountered, remaining indices are ignored. Indeed, % lindex a 1 foo % lindex a 0 foo bad index "foo": must be integer?[+-]integer? or end?[+-]integer? % lindex a -1 foo - foundin changed to: "obsolete: 8.5a6"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "lars_h"
- subsystem changed to: "17. Commands I-L"
- title changed to: "[lindex] accepts bad index"
- type changed to: "Bug"