Artifacts Associated With Ticket 224600
Ticket change [b8e5e81656] (rid 129040) by kennykb on 2000-12-05 19:57:28:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
David Hawkins observes in <URL:http://x72.deja.com/viewthread.xp?AN=700160928> that the 'scan' comand in Tcl 8.3 has a regression from 8.0 in the handling of octal and hex representations of negative numbers. For example: 8.0 -- 'scan' could recover the result of 'format' applied to a negative number. % info tclversion 8.0 % info patchlevel 8.0.5 % set test1 [format {%o %x} -1 -1] 37777777777 ffffffff % scan $test1 {%o %x} a b 2 % list $a $b -1 -1 8.3 -- 'scan' no longer recovers the number. % info tclversion 8.3 % info patchlevel 8.3.2 % set test1 [format {%o %x} -1 -1] 37777777777 ffffffff % scan $test1 {%o %x} a b 2 % list $a $b 2147483647 2147483647 There appears no longer to be any way to use the 'scan' command to recover the original number that was passed to 'format'. The fix is simple -- use strtoul instead of strtol to parse %o and %x formats. Patch with test cases will be submitted shortly. - foundin initialized to: "obsolete: 8.4a2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "kennykb"
- subsystem initialized to: "81. Bundled Packages"
- title initialized to: "Regression in 'scan' of large octal/hex integers"
- type initialized to: "Bug"
Ticket change [dab519b7ac] (rid 107841) by kennykb on 2000-12-06 03:01:28:
- icomment:
Patch is at https://sourceforge.net/patch/?func=detailpatch&patch_id=102663&group_id=10894
- login: "kennykb"
- mimetype: "text/plain"
- username: "kennykb"
- icomment:
Ticket change [e11e23bd00] (rid 87393) by hobbs on 2000-12-10 09:59:14:
- closedate changed to: "2000-12-10T02:59:14"
- closer changed to: "hobbs"
- icomment:
Fixed with patch http://sourceforge.net/patch/?func=detailpatch&patch_id=102663&group_id=10894
- login: "hobbs"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "hobbs"
Ticket change [77a4fb1cf9] (rid 89812) by dgp on 2001-04-05 08:12:17:
- closedate changed to: "2001-04-05T01:12:17"
- closer changed to: "dgp"
- subsystem changed to: "23. [scan]"