Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 558d40a5b4b818f1af85a91f29da2cf4fe42e4c6
Ticket: 1360532fffffffffffffffffffffffffffffffff
leading/trailing whitespace handling
User & Date: marttj on 2005-11-24 07:36:22
Changes

  1. icomment:
    Logged In: YES 
    user_id=114531
    
    I find this very confusing.  Is this really a bug?  The code
    for [string is integer] and [string is double] both seem to
    specifically allow trailing whitespace.  The man page makes
    no mention of this, though.
    
    Why was trailing white space ever allowed?  Allowing it
    means I cannot safely do this:
    
    if {[string is double $d]} {
      set x [expr $d + 1]
    }
    
    Since trailing white space has been allowed for a long time,
    there could be code out there that does this:
    
    if {[string is double $d]} {
      incr d
    }
    
    This currently works, but would be broken if trailing white
    space was disallowed.
    
    I would really like to know what the plan to fix this is. 
    For sure, the documentation should be updated.
    
    
  2. login: "marttj"
  3. mimetype: "text/plain"
  4. username: "marttj"