ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tcl-core
tcl-core
Re: [TCLCORE] The end for Tcl_PrintDouble in Tk?
by dgp other posts by this author
May 19 2009 8:48PM messages near this date
Re: [TCLCORE] The end for Tcl_PrintDouble in Tk? | Re: [TCLCORE] The end for Tcl_PrintDouble in Tk?
Quoting Jeff Hobbs <jeffh@[...].com> :
>       objPtr = Tcl_ObjPrintf("%s %f %f", entryPtr->scrollCmd, first, last);
>  ...
>  ... where "scrollCmd 0.0 1.0" was expected, it now receives
>  "scrollCmd 0.000000 1.000000".

I think %f is the wrong tool for the job.  In your example,
the differences are mere formatting matters, but try again
with the values 0.0000001 and 0.0000004 .  The precision
of %f formatting -- whether you take the default of 6, or
whether you specify something else -- is the number of digits
printed after the decimal point, and takes no account of
significant digits.  I think you will see the first and
last values collapse into one value 0.000000 and I'd expect
scroll commands to be unhappy with that.

DGP

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
Tcl-Core mailing list
Tcl-Core@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-core
Thread:
Jeff Hobbs
Joe English
dgp
Jeff Hobbs
Joe English
Michael Kirkham
Joe English
Jeff Hobbs

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved