Tcl Source Code

View Ticket
Login
Ticket UUID: a5a99f0aef0a6923c4a3ef4c744527a0ed328901
Title: lsearch returns different results depending on order of -bisect and -exact arguments
Type: Bug Version:
Submitter: pooryorick Created on: 2021-12-30 14:12:29
Subsystem: 17. Commands I-L Assigned To: nobody
Priority: 5 Medium Severity: Important
Status: Open Last Modified: 2021-12-30 14:12:29
Resolution: None Closed By: nobody
    Closed on:
Description: (text/x-fossil-wiki)
In the following example, swapping <code>-bisect</code> and <code>-exact</code>
causes <code>lsearch</code> to behave differently:

<code><verbatim>
% lsearch -bisect -exact -stride 2 -index 0 {one two} three
-1
% lsearch -exact -bisect -stride 2 -index 0 {one two} three
0
</verbatim></code>