Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 294ebe126f5dba32bd48a633d65d9f31f8892672
Ticket: 634856ffffffffffffffffffffffffffffffffff
results of 'string is integer' are wrong
User & Date: kennykb on 2002-11-07 23:48:01
Changes

  1. assignee changed to: "hobbs"
  2. icomment:
    Logged In: YES 
    user_id=99768
    
    The problem is actually in Tcl_GetIntFromObj, as the following shows.
    Note that literal sharing confuses the issue, since once the object
    acquires the integer internal representation that it shouldn't have, it
    keeps that internal rep.
    
    (bin) 49 % info patchlevel
    8.4.0
    (bin) 50 % set x "+ -1"
    + -1
    (bin) 51 % expr { $x + 0 }
    can't use non-numeric string as operand of "+"
    (bin) 52 % set y [format %d $x]
    -1
    (bin) 53 % set x
    + -1
    (bin) 54 % expr { $x + 0 }
    -1
    
    
    
  3. login: "kennykb"
  4. mimetype: "text/plain"
  5. priority changed to: "7 High"
  6. subsystem changed to: "10. Objects"
  7. username: "kennykb"