summaryrefslogtreecommitdiffstats
path: root/contrib/tcl/doc/PrintDbl.3
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tcl/doc/PrintDbl.3')
-rw-r--r--contrib/tcl/doc/PrintDbl.345
1 files changed, 45 insertions, 0 deletions
diff --git a/contrib/tcl/doc/PrintDbl.3 b/contrib/tcl/doc/PrintDbl.3
new file mode 100644
index 0000000..413e2b7
--- /dev/null
+++ b/contrib/tcl/doc/PrintDbl.3
@@ -0,0 +1,45 @@
+'\"
+'\" Copyright (c) 1989-1993 The Regents of the University of California.
+'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
+'\"
+'\" See the file "license.terms" for information on usage and redistribution
+'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+'\"
+'\" SCCS: @(#) PrintDbl.3 1.6 96/03/25 20:05:45
+'\"
+.so man.macros
+.TH Tcl_PrintDouble 3 7.0 Tcl "Tcl Library Procedures"
+.BS
+.SH NAME
+Tcl_PrintDouble \- Convert floating value to string
+.SH SYNOPSIS
+.nf
+\fB#include <tcl.h>\fR
+.sp
+\fBTcl_PrintDouble\fR(\fIinterp, value, dst\fR)
+.SH ARGUMENTS
+.AS Tcl_Interp *interp
+.AP Tcl_Interp *interp in
+Interpreter that controls the conversion.
+.AP double value in
+Floating-point value to be converted.
+.AP char *dst out
+Where to store string representing \fIvalue\fR. Must have at
+least TCL_DOUBLE_SPACE characters of storage.
+.BE
+
+.SH DESCRIPTION
+.PP
+\fBTcl_PrintDouble\fR generates a string that represents the value
+of \fIvalue\fR and stores it in memory at the location given by
+\fIdst\fR. It uses %g format to generate the string, with two
+special twists. First, the string is guaranteed to contain either
+a ``.'' or an ``e'' so that it doesn't look like an integer (where
+%g would generate an integer with no decimal point, \fBTcl_PrintDouble\fR
+adds ``.0''). Second, the number of significant digits printed at
+\fIdst\fR is controlled by the \fBtcl_precision\fR variable in
+\fIinterp\fR; if \fBtcl_precision\fR is undefined then 6 significant
+digits are printed.
+
+.SH KEYWORDS
+conversion, double-precision, floating-point, string
OpenPOWER on IntegriCloud