diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-06-19 10:58:14 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-06-19 10:58:14 (GMT) |
commit | 8dd4b39af17155b4a173637e4abe472c4ce73c28 (patch) | |
tree | 02649f9bacbbf2fb0426614643091e56d93e52aa | |
parent | 81b19355c247673c82d65bc0aacab6588e2665c8 (diff) | |
download | tcl-8dd4b39af17155b4a173637e4abe472c4ce73c28.zip tcl-8dd4b39af17155b4a173637e4abe472c4ce73c28.tar.gz tcl-8dd4b39af17155b4a173637e4abe472c4ce73c28.tar.bz2 |
Document %z and %t size modifiers for 'format' and 'scan'
-rw-r--r-- | doc/format.n | 19 | ||||
-rw-r--r-- | doc/scan.n | 25 |
2 files changed, 23 insertions, 21 deletions
diff --git a/doc/format.n b/doc/format.n index 78fd352..f762f7a 100644 --- a/doc/format.n +++ b/doc/format.n @@ -14,7 +14,6 @@ format \- Format a string in the style of sprintf .SH SYNOPSIS \fBformat \fIformatString \fR?\fIarg arg ...\fR? .BE - .SH INTRODUCTION .PP This command generates a formatted string in a fashion similar to the @@ -127,15 +126,15 @@ then the next argument to the \fBformat\fR command determines the precision; it must be a numeric string. .SS "OPTIONAL SIZE MODIFIER" .PP -The fifth part of a conversion specifier is a size modifier, -which must be \fBll\fR, \fBh\fR, \fBl\fR, \fBz\fR, \fBt\fR, or \fBL\fR. -If it is \fBll\fR it specifies that an integer value is taken -without truncation for conversion to a formatted substring. -If it is \fBh\fR it specifies that an integer value is -truncated to a 16-bit range before converting. This option is rarely useful. -If it is \fBl\fR (or \fBj\fR or \fBq\fR) it specifies that the integer value -is truncated to the same range as that produced by the \fBwide()\fR -function of the \fBexpr\fR command (at least a 64-bit range). +The fifth part of a conversion specifier is a size modifier, which must +be \fBh\fR, \fBl\fR, \fBq\fR, \fBj\fR, \fBz\fR, \fBt\fR, +\fBll\fR, or \fBL\fR. If it is \fBll\fR it specifies that an integer +value is taken without truncation for conversion to a formatted +substring. If it is \fBh\fR it specifies that an integer value is +truncated to a 16-bit range before converting. This option is rarely +useful. If it is \fBl\fR (or \fBj\fR or \fBq\fR) it specifies that the +integer value is truncated to the same range as that produced by the +\fBwide()\fR function of the \fBexpr\fR command (at least a 64-bit range). If it is \fBz\fR or \fBt\fR it specifies that the integer value is truncated to the range determined by the value of the \fBpointerSize\fR element of the \fBtcl_platform\fR array. @@ -73,17 +73,20 @@ The size modifier field is used only when scanning a substring into one of Tcl's integer values. The size modifier field dictates the integer range acceptable to be stored in a variable, or, for the inline case, in a position in the result list. -The syntactically valid values for the size modifier are \fBh\fR, \fBL\fR, -\fBl\fR, \fBz\fR, \fBt\fR, and \fBll\fR. The \fBh\fR size -modifier value is equivalent -to the absence of a size modifier in the the conversion specifier. -Either one indicates the integer range to be stored is limited to the range -determined by the value of the \fBwordSize\fR element of the \fBtcl_platform\fR -array). The \fBL\fR, \fBq\fR or \fBj\fR size modifiers are equivalent to the -\fBl\fR size modifier. Either of them indicates the integer range to be stored is -limited to the same range produced by the \fBwide()\fR function of -the \fBexpr\fR command. The \fBll\fR size modifier indicates that -the integer range to be stored is unlimited. +The syntactically valid values for the size modifier are \fBh\fR, +\fBl\fR, \fBq\fR, \fBj\fR, \fBz\fR, \fBt\fR, \fBll\fR, and \fBL\fR. +The \fBh\fR size modifier value is equivalent to the absence of a size +modifier in the the conversion specifier. Either one indicates the +integer range to be stored is limited to the range determined by the +value of the \fBwordSize\fR element of the \fBtcl_platform\fR array). +The \fBL\fR, \fBq\fR or \fBj\fR size modifiers are equivalent to the +\fBl\fR size modifier. Either of them indicates the integer range to +be stored is limited to the same range produced by the \fBwide()\fR +function of the \fBexpr\fR command. The \fBll\fR size modifier +indicates that the integer range to be stored is unlimited. +The \fBz\fR and \fBt\fR modifiers indicate the integer range to be +the same as for either \fBh\fR or \fBl\fR, depending on the +value of the \fBpointerSize\fR element of the \fBtcl_platform\fR array. .SS "MANDATORY CONVERSION CHARACTER" .PP The following conversion characters are supported: |