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
|