Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 1a056e905ad40fa61b320b3f40871013ea79c95c9b8307075521686bca614a51
Ticket: cd61f085da52b3384388c8ef780f53d8c55ead4f
tcl terminates silently with invalid expr underscore syntax and radix prefix
User & Date: juliannoble2 on 2023-08-30 12:33:52
Changes

  1. icomment:
    From playing with this bugfix version - it's become clearer to me that the bigger problem is minor 'numeric whitespace' editing (i.e changing internal underscores)
    causing accidental string comparisons in later expressions which could go unnoticed depending on the data.
    
    Because 1.e2  is legitimate notation - rules around underscore not being allowed near the . or the e or the +|- in scientific notation become too complex and prone to accidental string comparison as in my previous example.
    
    My concern about people splitting on .  in 0_._0  (or on eE )  are less important - and best addressed by documenting something along the lines of: Use 'string map {_ ""} $num'  prior to doing any string analysis of a number or its components.
    
    I think the initial version had this right in being lenient about internal underscores  - except for the bug reported in this ticket.
    
  2. login: "juliannoble2"
  3. mimetype: "text/plain"