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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tcl/] [doc/] [PrintDbl.3] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
'\"
2
'\" Copyright (c) 1989-1993 The Regents of the University of California.
3
'\" Copyright (c) 1994-1997 Sun Microsystems, Inc.
4
'\"
5
'\" See the file "license.terms" for information on usage and redistribution
6
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
7
'\"
8
'\" RCS: @(#) $Id: PrintDbl.3,v 1.1.1.1 2002-01-16 10:25:24 markom Exp $
9
'\"
10
.so man.macros
11
.TH Tcl_PrintDouble 3 8.0 Tcl "Tcl Library Procedures"
12
.BS
13
.SH NAME
14
Tcl_PrintDouble \- Convert floating value to string
15
.SH SYNOPSIS
16
.nf
17
\fB#include \fR
18
.sp
19
\fBTcl_PrintDouble\fR(\fIinterp, value, dst\fR)
20
.SH ARGUMENTS
21
.AS Tcl_Interp *interp
22
.AP Tcl_Interp *interp in
23
.VS
24
Before Tcl 8.0, the \fBtcl_precision\fR variable in this interpreter
25
controlled the conversion.  As of Tcl 8.0, this argument is ignored and
26
the conversion is controlled by the \fBtcl_precision\fR variable
27
that is now shared by all interpreters.
28
.VE
29
.AP double value in
30
Floating-point value to be converted.
31
.AP char *dst out
32
Where to store string representing \fIvalue\fR.  Must have at
33
least TCL_DOUBLE_SPACE characters of storage.
34
.BE
35
 
36
.SH DESCRIPTION
37
.PP
38
\fBTcl_PrintDouble\fR generates a string that represents the value
39
of \fIvalue\fR and stores it in memory at the location given by
40
\fIdst\fR.  It uses \fB%g\fR format to generate the string, with one
41
special twist: the string is guaranteed to contain either
42
a ``.'' or an ``e'' so that it doesn't look like an integer.  Where
43
\fB%g\fR would generate an integer with no decimal point, \fBTcl_PrintDouble\fR
44
adds ``.0''.
45
 
46
.SH KEYWORDS
47
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.