Overview
| Artifact ID: | de6ed6a7da39c637d9253c6fd6db0ec7b700c827 |
|---|---|
| Ticket: | 3045123fffffffffffffffffffffffffffffffff
linsert man page end indexing inconsistency |
| User & Date: | andygoth on 2010-08-15 01:33:42 |
Changes
- assignee changed to: "dkf"
- cmimetype changed to: "text/plain"
- comment changed to:
Copied from http://wiki.tcl.tk/1485 : According to the man page, "[linsert] produces a new list from list by inserting all of the element arguments just before the index’th element of list." When doing end-relative indexing, this definition doesn't match the actual behavior. To explain how index is interpreted, the [linsert] man page refers to the [string index] man page, which says that end indicates the last element. From this I expect that [linsert {0 1 2} end x] will return {0 1 x 2}, the result of inserting x just before the end element of the list, which is 2. However, it actually returns {0 1 2 x}, so when doing end-relative indexing it inserts the new elements just after the indicated index. An alternative, more plausible explanation is that it inserts the new elements such that the first or last of the inserted elements will occupy the indicated index. Suggest updating the documentation to resolve this inconsistency. - foundin changed to: "obsolete: 8.6b1.1"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "andygoth"
- subsystem changed to: "17. Commands I-L"
- title changed to: "linsert man page end indexing inconsistency"
- type changed to: "Bug"