"string is double 09" has the result 0
Closed / Out of Dateb26683861df920d972436f0ae8ee627362278047Created 10 years agoUpdated 9 years ago
Descriptionplain2016-08-25 09:50:15
I suppose the result of the following command has to be 1, based on the description of Tcl_GetDouble. % string is double 09 0 Tcl_GetDouble expects src to consist of a floating-point number, which is: white space; a sign; a sequence of digits; a decimal point; a sequence of digits; the letter āeā; a signed decimal exponent; and more white space. Any of the fields may be omitted, except that the digits either before or after the decimal point must be present and if the āeā is present then it must be followed by the exponent number.
dkfwiki2016-10-09 16:18:31
Documentation for Tcl_GetDouble was wrong.
zoltan3plain2016-10-10 05:25:10
The changed doku explains the behavior, thank you. But before 8.5 (where the number parsing has been changed, I think), e.g. with Tcl 8.4, you get this: % string is double 09 1 This is not supposed to be correct based on either the new or the old version of the doku of Tcl_GetDouble.
dgp Closed ticket [b26683861d].
[History diff]2018-05-07 16:08:44
Log in (anonymous is fine) to add a comment.