1Tcl_PrintDouble(3)          Tcl Library Procedures          Tcl_PrintDouble(3)
2
3
4
5______________________________________________________________________________
6

NAME

8       Tcl_PrintDouble - Convert floating value to string
9

SYNOPSIS

11       #include <tcl.h>
12
13       Tcl_PrintDouble(interp, value, dst)
14

ARGUMENTS

16       Tcl_Interp   *interp   (in)      Before   Tcl  8.0,  the  tcl_precision 
17                                        variable  in  this  interpreter   con‐ │
18                                        trolled  the  conversion.   As  of Tcl │
19                                        8.0, this argument is ignored and  the │
20                                        conversion   is   controlled   by  the │
21                                        tcl_precision  variable  that  is  now │
22                                        shared by all interpreters.
23
24       double       value     (in)      Floating-point value to be converted.
25
26       char         *dst      (out)     Where  to  store  string  representing
27                                        value.  Must have  at  least  TCL_DOU‐
28                                        BLE_SPACE characters of storage.
29_________________________________________________________________
30
31

DESCRIPTION

33       Tcl_PrintDouble  generates  a string that represents the value of value
34       and stores it in memory at the location given by dst.  It uses %g  for‐
35       mat to generate the string, with one special twist: the string is guar‐
36       anteed to contain either a ``.'' or an ``e'' so that  it  doesn't  look
37       like  an  integer.   Where %g would generate an integer with no decimal
38       point, Tcl_PrintDouble adds ``.0''.
39
40

KEYWORDS

42       conversion, double-precision, floating-point, string
43
44
45
46Tcl                                   8.0                   Tcl_PrintDouble(3)
Impressum