Tcl Source Code

View Ticket
Login
Ticket UUID: 1382287
Title: "string is double" shimmers object, while returning 0
Type: Bug Version: obsolete: 8.5a4
Submitter: thippler Created on: 2005-12-16 09:30:16
Subsystem: 18. Commands M-Z Assigned To: kennykb
Priority: 7 High Severity:
Status: Closed Last Modified: 2006-01-14 10:20:47
Resolution: Fixed Closed By: sf-robot
    Closed on: 2006-01-14 03:20:47
Description:
Since a4 a new string to number conversion technique
has been introduced. This new behaviour, in current
state,  can lead to severe program failures.

The question is, can it be considered valid for "string
is double" to return 0 (false) while shimmering the
Tcl_Obj in question to "double"?


The attached TCL snippet illustrates the problem.
User Comments: sf-robot added on 2006-01-14 10:20:47:
Logged In: YES 
user_id=1312539

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

dgp added on 2005-12-20 01:39:42:

File Deleted - 160402:

dgp added on 2005-12-20 01:39:41:

File Added - 160407: 1382287.patch

Logged In: YES 
user_id=80530


updated patch includes
tests.  committing now, but
leaving assigned to kennykb
in case he wants further
review when back at work.

dgp added on 2005-12-20 01:14:57:

File Added - 160402: 1382287.patch

dgp added on 2005-12-20 01:14:56:
Logged In: YES 
user_id=80530


here's a patch that fixes
1382287 and 1360532.

still needs some test cases.

dgp added on 2005-12-17 03:12:44:
Logged In: YES 
user_id=80530


This is related to 1360532.

Both bugs arise because the
[string is] implementation
does its own scan checking
for trailing whitespace after
TclParseNumber returns.

The "right" solution may still
involve more revisions to the
TclParseNumber() interface.

dgp added on 2005-12-17 00:11:33:
Logged In: YES 
user_id=80530

% set x 2turtledoves
2turtledoves
% string is double $x
0
% string is double $x
1

dgp added on 2005-12-17 00:03:37:
Logged In: YES 
user_id=80530

Thanks for catching this.

thippler added on 2005-12-16 16:39:42:

File Added - 160060: a4numbers_bug.tcl

msofer added on 2005-12-16 16:35:01:
Logged In: YES 
user_id=148712

No file is attached.

Attachments: