NAME
TclPrintDouble - Convert floating value to string
SYNOPSIS
##iinncclluuddee <
TTccllPPrriinnttDDoouubbllee(interp, value, dst) AARRGGUUMMEENNTTSS TclInterp *interp (in) Before Tcl 8.0, the ttccllpprreecciissiioonn |> variable in this interpreter con- |
trolled the conversion. As of Tcl | 8.0, this argument is ignored and the | conversion is controlled by the | ttccllpprreecciissiioonn variable that is now | shared by all interpreters.double value (in) Floating-point value to be converted.
char *dst (out) Where to store string representingvalue. Must have at least TCLDOU-
BLESPACE characters of storage.DESCRIPTION
TTccllPPrriinnttDDoouubbllee generates a string that represents the value of valueand stores it in memory at the location given by dst. It uses %%gg for-
mat to generate the string, with one special twist: the string is guar-
anteed to contain either a ``.'' or an ``e'' so that it doesn't looklike an integer. Where %%gg would generate an integer with no decimal
point, TTccllPPrriinnttDDoouubbllee adds ``.0''. KKEEYYWWOORRDDSSconversion, double-precision, floating-point, string
Tcl 8.0 TclPrintDouble(3)