Overview
| Artifact ID: | c37e20118a1f7a3ebdfc77adc1aac5215511d88b7d29e243f0e861f15be147b3 |
|---|---|
| Ticket: | fa00fbbbabe2d77904ac0086884d5debf9c529a5
lseq / lindex discrepancies |
| User & Date: | apnadkarni on 2023-04-12 15:33:52 |
Changes
- comment changed to:
I expect lindex with indices larger than list size to return empty string. This is the case with small lseq ranges but not large ones (64-bit build) ``` % lindex [lseq 0x10] 0x11 -> correctly returns empty string % lindex [lseq 0x7fffffff] 0x80000000 -> generates error instead index 2147483648 is out of bounds 0 to 2147483646 % ``` Another possibly related (on 32-bit build). This may be related to signed/unsigned indexing and may go away with TIP 660. ``` % lindex [lseq 0xffffffff] 0x80000000 -> should return 2147483648 % ``` Finally, some check (and exception) is needed when list limit is exceeded. The following on *32-bit* Tcl should generate an error since the full range of elements cannot be accessed by indexing. ``` % llength [lseq 0x100000000] 0 ``` I have not tried this on the tip-636 branch. /Ashok
- login: "apnadkarni"
- mimetype: "text/plain"