Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: d3a4eb2a8a2adfb8803914b2f6a252dc4b361d47344a9bb303c3a9ece4b3fce7
Ticket: 999b6966b29915bf9e3754969e5521e7573dc667
lseq has incorrect results in edge cases
User & Date: juliannoble2 on 2025-11-27 17:01:50
Changes

  1. icomment:
    There is also consistency with a directionless sequence to be considered
    
    %lseq 10 10 $x
    
    returns 10 for any value of $x except zero - which seems reasonable.
    
    My feeling is that lseq should return the first element even when the sign doesn't match as that (to me anyway) seems the most logically consistent.
    
    As it stands, with the possibility to use basic integer expressions for start and and step - the behaviour feels surprising, even though these are somewhat edge cases.
    
  2. login: "juliannoble2"
  3. mimetype: "text/plain"