diff options
Diffstat (limited to 'doc/scan.n')
-rw-r--r-- | doc/scan.n | 55 |
1 files changed, 17 insertions, 38 deletions
@@ -86,33 +86,23 @@ the integer range to be stored is unlimited. .SS "MANDATORY CONVERSION CHARACTER" .PP The following conversion characters are supported: -.TP -\fBd\fR -. +.IP \fBd\fR The input substring must be a decimal integer. It is read in and the integer value is stored in the variable, truncated as required by the size modifier value. -.TP -\fBo\fR -. +.IP \fBo\fR The input substring must be an octal integer. It is read in and the integer value is stored in the variable, truncated as required by the size modifier value. -.TP -\fBx\fR or \fBX\fR -. +.IP "\fBx\fR or \fBX\fR" The input substring must be a hexadecimal integer. It is read in and the integer value is stored in the variable, truncated as required by the size modifier value. -.TP -\fBb\fR -. +.IP \fBb\fR The input substring must be a binary integer. It is read in and the integer value is stored in the variable, truncated as required by the size modifier value. -.TP -\fBu\fR -. +.IP \fBu\fR The input substring must be a decimal integer. The integer value is truncated as required by the size modifier value, and the corresponding unsigned value for that truncated @@ -120,35 +110,28 @@ range is computed and stored in the variable as a decimal string. The conversion makes no sense without reference to a truncation range, so the size modifier \fBll\fR is not permitted in combination with conversion character \fBu\fR. -.TP -\fBi\fR -. -The input substring must be an integer. The base (i.e. decimal, octal, or hexadecimal) is determined by the C convention (leading 0 for octal; prefix 0x for hexadecimal). The integer value is stored in the variable, -truncated as required by the size modifier value. -.TP -\fBc\fR -. +.IP \fBi\fR +The input substring must be an integer. The base (i.e. decimal, +octal, or hexadecimal) is determined by the C convention (leading +0 for octal; prefix 0x for hexadecimal). The integer value is +stored in the variable, truncated as required by the size modifier +value. +.IP \fBc\fR A single character is read in and its Unicode value is stored in the variable as an integer value. Initial white space is not skipped in this case, so the input substring may be a white-space character. -.TP -\fBs\fR -. +.IP \fBs\fR The input substring consists of all the characters up to the next white-space character; the characters are copied to the variable. -.TP -\fBe\fR or \fBf\fR or \fBg\fR or \fBE\fR or \fBG\fR -. +.IP "\fBe\fR or \fBf\fR or \fBg\fR or \fBE\fR or \fBG\fR" The input substring must be a floating-point number consisting of an optional sign, a string of decimal digits possibly containing a decimal point, and an optional exponent consisting of an \fBe\fR or \fBE\fR followed by an optional sign and a string of decimal digits. It is read in and stored in the variable as a floating-point value. -.TP -\fB[\fIchars\fB]\fR -. +.IP \fB[\fIchars\fB]\fR The input substring consists of one or more characters in \fIchars\fR. The matching string is stored in the variable. If the first character between the brackets is a \fB]\fR then @@ -159,9 +142,7 @@ contains a sequence of the form \fIa\fB\-\fIb\fR then any character between \fIa\fR and \fIb\fR (inclusive) will match. If the first or last character between the brackets is a \fB\-\fR, then it is treated as part of \fIchars\fR rather than indicating a range. -.TP -\fB[^\fIchars\fB]\fR -. +.IP \fB[^\fIchars\fB]\fR The input substring consists of one or more characters not in \fIchars\fR. The matching string is stored in the variable. If the character immediately following the \fB^\fR is a \fB]\fR then it is @@ -173,9 +154,7 @@ character between \fIa\fR and \fIb\fR (inclusive) will be excluded from the set. If the first or last character between the brackets is a \fB\-\fR, then it is treated as part of \fIchars\fR rather than indicating a range value. -.TP -\fBn\fR -. +.IP \fBn\fR No input is consumed from the input string. Instead, the total number of characters scanned from the input string so far is stored in the variable. .PP |