#2207 [binary scan] fails with certain 64-bit ints

obsolete: 8.4.1
closed-fixed
5
2003-02-21
2003-02-21
No

If a 'w' format group on [binary scan] gets a 64-bit integer with the 2**31 bit set, it returns incorrect
results.

% binary scan [binary format w [expr { wide(3) << 31 }]] w x
1
% set x
-2147483648

% parray tcl_platform
tcl_platform(byteOrder) = littleEndian
tcl_platform(machine) = intel
tcl_platform(os) = Windows NT
tcl_platform(osVersion) = 5.0
tcl_platform(platform) = windows
tcl_platform(user) = kennykb
tcl_platform(wordSize) = 4
% set tcl_patchLevel
8.4.1

Discussion

  • Kevin B KENNY

    Kevin B KENNY - 2003-02-21
    • assigned_to: nijtmans --> dkf
     
  • Donal K. Fellows

    Logged In: YES
    user_id=79902

    What was I thinking of when I wrote that code? :^(

     
  • Donal K. Fellows

    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks