A NOTE has been added to this issue. ====================================================================== https://austingroupbugs.net/view.php?id=1592 ====================================================================== Reported By: geoffclare Assigned To: ====================================================================== Project: Issue 8 drafts Issue ID: 1592 Category: Shell and Utilities Type: Enhancement Request Severity: Comment Priority: normal Status: New Name: Geoff Clare Organization: The Open Group User Reference: Section: printf Page Number: 3085 Line Number: 104307 Final Accepted Text: ====================================================================== Date Submitted: 2022-07-15 08:36 UTC Last Modified: 2022-07-18 14:51 UTC ====================================================================== Summary: Add %n$ support to the printf utility ======================================================================
---------------------------------------------------------------------- (0005893) bhaible (reporter) - 2022-07-18 14:51 https://austingroupbugs.net/view.php?id=1592#c5893 ---------------------------------------------------------------------- Replying to Robert Elz: > the one issue considered worthy of adoption was the: > "it would be preferable for printf to treat a missing argument as an error" > issue Format strings in C also have the same restrictions that: (A) Numbered and unnumbered arguments cannot be used in the same format string. (B) Missing arguments in a format string with numbered arguments are an error. Restriction (A) has the purpose to ensure a clear specification, and also to catch some kinds of unintentional programmer/translator mistakes. Restriction (B) exists in C, because sizeof(argument) can only be deduced from the conversion specifier. In languages where each argument is merely a pointer, such as Awk, Boost, JavaScript, Ruby, Tcl, this restriction is unnecessary. For shell programming, where each argument is a plain string, it is unnecessary as well. Issue History Date Modified Username Field Change ====================================================================== 2022-07-15 08:36 geoffclare New Issue 2022-07-15 08:36 geoffclare Name => Geoff Clare 2022-07-15 08:36 geoffclare Organization => The Open Group 2022-07-15 08:36 geoffclare Section => printf 2022-07-15 08:36 geoffclare Page Number => 3085 2022-07-15 08:36 geoffclare Line Number => 104307 2022-07-15 08:39 geoffclare Desired Action Updated 2022-07-16 08:23 kre Note Added: 0005890 2022-07-16 08:47 kre Note Edited: 0005890 2022-07-16 08:53 kre Note Edited: 0005890 2022-07-16 08:57 kre Note Edited: 0005890 2022-07-18 11:17 geoffclare Note Added: 0005891 2022-07-18 14:14 bhaible Note Added: 0005892 2022-07-18 14:51 bhaible Note Added: 0005893 ======================================================================