Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 85d1d59305bb5082741ed976059630fde632a1f0
Ticket: 495213ffffffffffffffffffffffffffffffffff
bug in scan command
User & Date: hemanglavana on 2001-12-19 22:55:37
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Hemang,
    
    You have indeed found a bug in the scan command.  This occured
    when 'scan' was rewritten for 8.1 to support unicode.  The problem
    is rather simple - it won't read past the "0x...", so you are
    always scanning the 0 before the x.  You can see this with:
            scan 0x001 %xx%x
    =>      0 1
    
    The workaround is to do:
            set a [expr $a]
    
    and then the scan.  This does need to be reported to SourceForge
    as well.  Is this something that you will also need corrected in
    the IOS port?
    
    Thanks,
    
      Jeff Hobbs                     The Tcl Guy
      Senior Developer               http://www.ActiveState.com/
          Tcl Support and Productivity Solutions
    
    
    > -----Original Message-----
    > From: Hemang Lavana [mailto:[email protected]]
    > Sent: December 19, 2001 1:12 PM
    > To: [email protected]
    > Cc: [email protected]; [email protected]
    > Subject: Bug in scan command?
    > 
    > 
    > Hello Jeff,
    > 
    > Is this a bug in scan command? I tried these commands in tcl8.3.4.1
    > version on win2k and got the same results. Note that ATS3.2 contains
    > tcl8.0.5 version and ATS3.4 contains tcl8.3.3 version.
    > 
    > % package provide ActiveTcl
    > 8.3.4.1
    > (bin) 2 % set a 0x0001
    > 0x0001
    > (bin) 3 % scan $a %x a
    > 1
    > (bin) 4 % puts $a
    > 0
    > (bin) 5 % scan 0xff %x
    > 0
    > 
    > Let me know if you want me to file a bug on SF.
    > 
    > Thanks,
    > Hemang.
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "hemanglavana"
  9. subsystem changed to: "None"
  10. title changed to: "bug in scan command"
  11. type changed to: "Bug"