OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tcl/] [doc/] [PrintDbl.3] - Diff between revs 578 and 1765

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 578 Rev 1765
'\"
'\"
'\" Copyright (c) 1989-1993 The Regents of the University of California.
'\" Copyright (c) 1989-1993 The Regents of the University of California.
'\" Copyright (c) 1994-1997 Sun Microsystems, Inc.
'\" Copyright (c) 1994-1997 Sun Microsystems, Inc.
'\"
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
'\" RCS: @(#) $Id: PrintDbl.3,v 1.1.1.1 2002-01-16 10:25:24 markom Exp $
'\" RCS: @(#) $Id: PrintDbl.3,v 1.1.1.1 2002-01-16 10:25:24 markom Exp $
'\"
'\"
.so man.macros
.so man.macros
.TH Tcl_PrintDouble 3 8.0 Tcl "Tcl Library Procedures"
.TH Tcl_PrintDouble 3 8.0 Tcl "Tcl Library Procedures"
.BS
.BS
.SH NAME
.SH NAME
Tcl_PrintDouble \- Convert floating value to string
Tcl_PrintDouble \- Convert floating value to string
.SH SYNOPSIS
.SH SYNOPSIS
.nf
.nf
\fB#include \fR
\fB#include \fR
.sp
.sp
\fBTcl_PrintDouble\fR(\fIinterp, value, dst\fR)
\fBTcl_PrintDouble\fR(\fIinterp, value, dst\fR)
.SH ARGUMENTS
.SH ARGUMENTS
.AS Tcl_Interp *interp
.AS Tcl_Interp *interp
.AP Tcl_Interp *interp in
.AP Tcl_Interp *interp in
.VS
.VS
Before Tcl 8.0, the \fBtcl_precision\fR variable in this interpreter
Before Tcl 8.0, the \fBtcl_precision\fR variable in this interpreter
controlled the conversion.  As of Tcl 8.0, this argument is ignored and
controlled the conversion.  As of Tcl 8.0, this argument is ignored and
the conversion is controlled by the \fBtcl_precision\fR variable
the conversion is controlled by the \fBtcl_precision\fR variable
that is now shared by all interpreters.
that is now shared by all interpreters.
.VE
.VE
.AP double value in
.AP double value in
Floating-point value to be converted.
Floating-point value to be converted.
.AP char *dst out
.AP char *dst out
Where to store string representing \fIvalue\fR.  Must have at
Where to store string representing \fIvalue\fR.  Must have at
least TCL_DOUBLE_SPACE characters of storage.
least TCL_DOUBLE_SPACE characters of storage.
.BE
.BE
.SH DESCRIPTION
.SH DESCRIPTION
.PP
.PP
\fBTcl_PrintDouble\fR generates a string that represents the value
\fBTcl_PrintDouble\fR generates a string that represents the value
of \fIvalue\fR and stores it in memory at the location given by
of \fIvalue\fR and stores it in memory at the location given by
\fIdst\fR.  It uses \fB%g\fR format to generate the string, with one
\fIdst\fR.  It uses \fB%g\fR format to generate the string, with one
special twist: the string is guaranteed to contain either
special twist: the string is guaranteed to contain either
a ``.'' or an ``e'' so that it doesn't look like an integer.  Where
a ``.'' or an ``e'' so that it doesn't look like an integer.  Where
\fB%g\fR would generate an integer with no decimal point, \fBTcl_PrintDouble\fR
\fB%g\fR would generate an integer with no decimal point, \fBTcl_PrintDouble\fR
adds ``.0''.
adds ``.0''.
.SH KEYWORDS
.SH KEYWORDS
conversion, double-precision, floating-point, string
conversion, double-precision, floating-point, string
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.