A NOTE has been added to this issue. ====================================================================== https://austingroupbugs.net/view.php?id=1476 ====================================================================== Reported By: kre Assigned To: ====================================================================== Project: Issue 8 drafts Issue ID: 1476 Category: Shell and Utilities Type: Error Severity: Editorial Priority: normal Status: New Name: Robert Elz Organization: User Reference: Section: XCU 2.14 / printf Page Number: 3086 Line Number: 104321 Final Accepted Text: ====================================================================== Date Submitted: 2021-05-19 12:21 UTC Last Modified: 2021-06-24 16:17 UTC ====================================================================== Summary: Missing '+' character in the second example explanation ======================================================================
---------------------------------------------------------------------- (0005390) geoffclare (manager) - 2021-06-24 16:17 https://austingroupbugs.net/view.php?id=1476#c5390 ---------------------------------------------------------------------- After line 104302 on page 3085 (XCU 2.14, printf, EXAMPLES), add:<blockquote>The command:<pre>printf '%d\n' 10 010 0x10</pre>produces: <table> <tr><th>Output Line</th><th>Explanation</th></tr> <tr><td><tt>10</tt></td><td>Decimal representation of the numeric value of decimal integer constant 10</td></tr> <tr><td><tt>8</tt></td><td>Decimal representation of the numeric value of octal integer constant 010</td></tr> <tr><td><tt>16</tt></td><td>Decimal representation of the numeric value of hexadecimal integer constant 0x10</td></tr> </table> If the implementation supports floating-point conversions, the command:<pre>LC_ALL=C printf '%.2f\n' 10 010 0x10 10.1e2 010.1e2 0x10.1p2</pre>produces: <table> <tr><th>Output Line</th><th>Explanation</th></tr> <tr><td><tt>10.00</tt></td><td>The string "10" interpreted as a decimal value, with 2 digits of precision.</td></tr> <tr><td><tt>10.00</tt></td><td>The string "010" interpreted as a decimal (not octal) value, with 2 digits of precision.</td></tr> <tr><td><tt>16.00</tt></td><td>The string "0x10" interpreted as a hexadecimal value, with 2 digits of precision.</td></tr> <tr><td><tt>1010.00</tt></td><td>The string "10.1e2" interpreted as a decimal floating-point value, with 2 digits of precision.</td></tr> <tr><td><tt>1010.00</tt></td><td>The string "010.1e2" interpreted as a decimal (not octal) floating-point value, with 2 digits of precision.</td></tr> <tr><td><tt>64.25</tt></td><td>The string "0x10.1p2" interpreted as a hexadecimal floating-point value, with 2 digits of precision.</td></tr> </table> </blockquote> On page 3086 replace lines 104320-104325 with the following table:<blockquote> <table> <tr><th>Output Line</th><th>Explanation</th></tr> <tr><td><tt>3</tt></td><td>Decimal representation of the numeric value 3</td></tr> <tr><td><tt>3</tt></td><td>Decimal representation of the numeric value +3</td></tr> <tr><td><tt>-3</tt></td><td>Decimal representation of the numeric value -3</td></tr> <tr><td><tt>51</tt></td><td>Decimal representation of the numeric value of the character <tt>'3'</tt> in the ISO/IEC 646: 1991 standard codeset</td></tr> <tr><td><tt>43</tt></td><td>Decimal representation of the numeric value of the character <tt>'+'</tt> in the ISO/IEC 646: 1991 standard codeset</td></tr> <tr><td><tt>45</tt></td><td>Decimal representation of the numeric value of the character <tt>'-'</tt> in the ISO/IEC 646: 1991 standard codeset</td></tr> </table></blockquote> In the paragraph at line 104326, move the second sentence ("Since the last two ...") to before the first sentence ("Note that in a locale ..."). Issue History Date Modified Username Field Change ====================================================================== 2021-05-19 12:21 kre New Issue 2021-05-19 12:21 kre Name => Robert Elz 2021-05-19 12:21 kre Section => XCU 2.14 / printf 2021-05-19 12:21 kre Page Number => 3086 2021-05-19 12:21 kre Line Number => 104321 2021-06-21 09:26 geoffclare Note Added: 0005388 2021-06-21 09:27 geoffclare Note Edited: 0005388 2021-06-24 16:17 geoffclare Note Added: 0005390 ======================================================================
