Artifacts Associated With Ticket 634856ffffffffffffffffffffffffffffffffff
Ticket change [9077569559] (rid 120456) by bwallner on 2002-11-07 07:36:46:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I'm checking input values and see this strange behaviour of the 'string is integer' command. puts "tcl_version: $tcl_version" set numbers {1 +1 ++1 +-1 -+1 -1 --1 "- +1" "+ \n+1" "- \t-1"} foreach num $numbers { puts "$num is integer: [string is integer $num]" } See the results of '[string is real]': set numbers {1.0 +1.0 ++1.0 +-1.0 -+1.0 -1.0 --1.0 "- +1.0" "+ \n+1.0" "- \t-1.0"} foreach num $numbers { puts "$num is double: [string is double $num]" } - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "bwallner"
- subsystem initialized to: "18. Commands M-Z"
- title initialized to: "results of 'string is integer' are wrong"
- type initialized to: "Bug"
Ticket change [294ebe126f] (rid 88848) by kennykb on 2002-11-07 23:48:01:
- assignee changed to: "hobbs"
- 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 - login: "kennykb"
- mimetype: "text/plain"
- priority changed to: "7 High"
- subsystem changed to: "10. Objects"
- username: "kennykb"
Add attachment "string634856.patch" [779e71f9e6] (rid 89806) by hobbs on 2002-11-15 02:42:17.
Ticket change [cf112bac6e] (rid 112896) by hobbs on 2002-11-15 02:42:17:
- icomment:
File Added - 35424: string634856.patch Logged In: YES user_id=72656 Attached is a patch which corrects this behavior in the head. I completely removed the funky functionality with #ifdef because I couldn't find a system to test a "bad strtoul" implementation. According to the C standard and reading of libc implementations, we shouldn't ever have this problem, but I left in at least the #ifdef in case someone finds such a system.
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
- icomment:
Ticket change [3d982f4404] (rid 121112) by hobbs on 2002-11-19 09:29:14:
- closedate changed to: "2002-11-19T02:29:14"
- closer changed to: "hobbs"
- icomment:
Logged In: YES user_id=72656 corrected for 8.4.2.
- login: "hobbs"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "hobbs"