PrintDbl.3
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:2k
- '"
- '" Copyright (c) 1989-1993 The Regents of the University of California.
- '" Copyright (c) 1994-1997 Sun Microsystems, Inc.
- '"
- '" See the file "license.terms" for information on usage and redistribution
- '" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- '"
- '" RCS: @(#) $Id: PrintDbl.3,v 1.2 1998/09/14 18:39:49 stanton Exp $
- '"
- .so man.macros
- .TH Tcl_PrintDouble 3 8.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_PrintDoublefR(fIinterp, value, dstfR)
- .SH ARGUMENTS
- .AS Tcl_Interp *interp
- .AP Tcl_Interp *interp in
- .VS
- Before Tcl 8.0, the fBtcl_precisionfR variable in this interpreter
- controlled the conversion. As of Tcl 8.0, this argument is ignored and
- the conversion is controlled by the fBtcl_precisionfR variable
- that is now shared by all interpreters.
- .VE
- .AP double value in
- Floating-point value to be converted.
- .AP char *dst out
- Where to store string representing fIvaluefR. Must have at
- least TCL_DOUBLE_SPACE characters of storage.
- .BE
- .SH DESCRIPTION
- .PP
- fBTcl_PrintDoublefR generates a string that represents the value
- of fIvaluefR and stores it in memory at the location given by
- fIdstfR. It uses fB%gfR format to generate the string, with one
- special twist: the string is guaranteed to contain either
- a ``.'' or an ``e'' so that it doesn't look like an integer. Where
- fB%gfR would generate an integer with no decimal point, fBTcl_PrintDoublefR
- adds ``.0''.
- .SH KEYWORDS
- conversion, double-precision, floating-point, string