summaryrefslogtreecommitdiffstats
path: root/doc/format.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2002-02-19 10:26:24 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2002-02-19 10:26:24 (GMT)
commit5aac27662665e33e21c3cf60764cb676fdfe5d19 (patch)
treef6962e8c9409c94325b90f93a1c815d4b0ef0e42 /doc/format.n
parentd1e337a77f3c449c4c13f528cabddeb241b75bd2 (diff)
downloadtcl-5aac27662665e33e21c3cf60764cb676fdfe5d19.zip
tcl-5aac27662665e33e21c3cf60764cb676fdfe5d19.tar.gz
tcl-5aac27662665e33e21c3cf60764cb676fdfe5d19.tar.bz2
Fixed behaviour of [format] on 64-bit platforms by defining it to work with
machine words by default. This seems to be what the test suite expected anyway, and it is a fairly sensible choice. The other alternative was to make %d always 32-bit and %ld always 64-bit, but that'd be more complex to do.
Diffstat (limited to 'doc/format.n')
-rw-r--r--doc/format.n20
1 files changed, 13 insertions, 7 deletions
diff --git a/doc/format.n b/doc/format.n
index db72688..b69a8f6 100644
--- a/doc/format.n
+++ b/doc/format.n
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: format.n,v 1.6 2002/02/15 14:28:47 dkf Exp $
+'\" RCS: @(#) $Id: format.n,v 1.7 2002/02/19 10:26:24 dkf Exp $
'\"
.so man.macros
.TH format n 8.1 Tcl "Tcl Built-In Commands"
@@ -133,7 +133,9 @@ truncated to a 16-bit value before converting.
This option is rarely useful.
.VS 8.4
If it is \fBl\fR it specifies that the numeric value should be (at
-least) a 64-bit value.
+least) a 64-bit value. If neither \fBh\fR or \fBl\fR are present,
+numeric values are interpreted as being values of the width of the
+native machine word, as described by \fBtcl_platform(wordSize)\fR.
.VE
.PP
The last thing in a conversion specifier is an alphabetic character
@@ -206,12 +208,16 @@ differences:
For \fB%c\fR conversions the argument must be a decimal string,
which will then be converted to the corresponding character value.
.IP [3]
-The \fBl\fR modifier is ignored; integer values are always converted
-as if there were no modifier present and real values are always
-converted as if the \fBl\fR modifier were present (i.e. type
-\fBdouble\fR is used for the internal representation).
+The \fBl\fR modifier
+.VS 8.4
+is ignored for real values and on 64-bit platforms, which are always
+converted as if the \fBl\fR modifier were present (i.e. the types
+\fBdouble\fR and \fBlong\fR are used for the internal representation
+of real and integer values, respectively).
+.VE 8.4
If the \fBh\fR modifier is specified then integer values are truncated
-to \fBshort\fR before conversion.
+to \fBshort\fR before conversion. Both \fBh\fR and \fBl\fR modifiers
+are ignored on all other conversions.
.SH "SEE ALSO"
sprintf(3), string(n)