This is the
talk page for discussing improvements to the
Printf article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google ( books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
![]() | This article is rated C-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||||
|
The edits by User:68.100.130.21 on this page were by me. -- Graue 21:31, 11 October 2005 (UTC)
the v-variants need to be explained better. Why are they necessary? I can understand that this has to do with the fact that you cannot simply
char* f(char* s, ...){ printf(s, ...); // what should the arguments be??? }
but a code example for how vprintf solves that would be nice. -- MarSch 13:33, 13 April 2006 (UTC)
In the sprintf example, related to buffer overflows, it says: "If username in the above example exceeds 50 characters in length..." Having 35 characters on username will be enough to overflow the buffer. They forgot to count the characters in "Your name is ", period, newline and terminating null character.
I think it would be very helpful to have an implimentation of printf - how it works at a lower level. I would think that it uses write() at the most basic portable level, but I have no idea where to find if thats true, or how it works. Fresheneesz 22:07, 17 September 2006 (UTC)
According to the spec, printf places its output on the stdout stream (which is a global variable of type FILE*) which is usable with eg fputc, fputs or fwrite. So somewhere along the line, printf must use one of those functions. Here's a link to glibc's implementation of vfprintf (in glibc, vfprintf is called by printf to do the actual work). It's not pretty! olsner 08:39, 14 January 2007 (UTC)
Could some one translate russian article? —The preceding unsigned comment was added by 89.223.67.131 ( talk) 14:00, 14 January 2007 (UTC).
The current explanation is confusing although strictly speaking correct. The statement that the value n is the next argument means that n should be the next argument that printf will parse from its argument list. Because printf at the point when it reads the '*' has not read the data value yet; this means that the width argument should come before the associated data value. Thus, the example is correct. I can't figure out how to re-word this so that it will be clear immediately clear even if the reader doesn't understand how printf works internally. -- 24.226.31.7 05:08, 8 February 2007 (UTC)
echo -n -e "$FOO\t$BAR'
Are the quotations right? I don't think so, but I do not know whether " or ' is correct in Shebang (Unix)? -- Lazer erazer 19:31, 10 April 2007 (UTC)
"
in order to have the $
character assume the appropriate semantics (using '
would've protected the $
from shell interpretation). I fixed. --
tiny plastic Grey Knight
⊖
13:18, 2 August 2007 (UTC)How about some history here? I failed to learn the thing I wanted to learn when I came to read this article: Where did the name "printf" come from? What's the 'f' for? Why isn't it simply named "print"? I remember being originally told that the 'f' stood for 'function', because it was the print function, but that makes little sense since *every* library call in C is a function. It wasn't fopenf() or strcpyf() or mallocf(). So what's the origin of the 'f'?
I would be very interested to know when printf was first introduced. My own memory is that I invented Lisp's "format" without any knowledge of "printf" whatsoever. Unix systems did not show up (at least not prominently) at MIT (at least at the MIT AI Lab) until after "format" was in place. Ken Thompson and Dennis Richie were working on Multics at the time ioa_ was introduced, suggesting strongly that printf was derived from ioa_, as was Lisp's "format". I particularly mention this because in Guy Steele and Richard Gabriel's paper on "The Evolution of Lisp", they say that "format" came from Fortran. When I told Steele that it was from ioa_, he asked whether ioa_ might have been influenced by Fortran. I got in touch with the original author of ioa_, Stan Dunten, who told me that specifiers like "F5.2" are "clearly from Fortran", but not the general idea of the control string with a variable number of arguments. -- DanielWeinreb 26 Oct 2008 —Preceding unsigned comment added by DanielWeinreb ( talk • contribs) 14:39, 26 October 2008 (UTC)
Lua has a %q
specifier in its string.format()
function (which is basically just like PHP's sprintf()
) which accepts a string argument and prints it with all special characters (like quotes, for instance) escaped with
backslashes (no quote delimiters are placed on the result unless you include them in the format string yourself). Does this variant exist in any other languages? Is it worth mentioning? --
tiny plastic Grey Knight
⊖
11:40, 2 August 2007 (UTC)
printf
builtin supports it. —
82.36.30.173 (
talk)
00:47, 10 August 2012 (UTC)I made a new, smaller, tidier lead paragraph, and moved the old one down into a "printf in different languages" section. That bit reads a bit oddly now that it's a section, but then again a lot of the article wouldn't suffer from a rewrite. I think a slightly more language-agnostic approach would be nice, with any particularly notable language idiosyncracies collected into a section lower down. -- tiny plastic Grey Knight ⊖ 13:11, 2 August 2007 (UTC)
The reason that I said that Java's implementation of printf
gives it the functionality of both printf
and fprintf it that it is possible to open a PrintStream object to write to a file and call that object's printf
method to write to that file (similar in practice to fprintf
, but more syntactically similar to printf
). Because
System.err
and (obviously)
System.out
are both PrintStream
objects, they both support printf
. --
Btx40 (
talk)
21:07, 28 April 2008 (UTC)
Should it not be mentioned that Java 1.5 and later also support a form of sprintf
in the form of String.format
method. It does differ in name, but the application of the function is nearly identical. --
Zanthra (
talk)
07:20, 20 May 2008 (UTC)
Then it should also mention MFC's CString::Format. AndrewWPhillips ( talk) 04:58, 9 November 2010 (UTC)
The section on precision uses "*" in the beginning of the sentence, shouldn't it be ".*" instead? The flag ".*" is used in the example printf
statement in the second sentence.
64.94.55.231 (
talk)
18:02, 16 June 2008 (UTC)
I want to replace code like the following (in Java, but PHP and C and C# and C++ are also important ;-) ...
System.out.println("Your age is " + age + " and your weight is " + weight);
with something like this ...
System.out.println("Your age is %int and your weight is %int", age, weight);
Please construct a few examples like this, for the weary programmer-in-a-hurry who doesn't want to wade through several paragraphs of formal specifications and historical detail. Just tell me how to use this functionality. -- Uncle Ed ( talk) 16:11, 23 August 2008 (UTC)
There is distinct controversy over the use of printf in languages that just pass an untyped buffer around and expect the developer to give clear instructions in the other parameters regarding how to divide it up. C and C++ do this, but I don't know how many other languages provide direct interaction with memory the way they do. This becomes especially problematic with C++'s pointer-redirection. It is a common issue to edit the format portion of a printf statement and an integer be accidentally cast as a pointer to string, resulting in crashes that only occur under odd conditions.
Is this something that can be included? Regardless of whether this belongs in the general article on printf, I'd still like to suggest that risks, gotchas, and work-arounds be moved to a discrete section of this article. Robert Rapplean ( talk) 18:35, 8 August 2009 (UTC)
This is a good point, though I will say that C++ only has printf by virtue of being (almost) a superset of C. In C++ you are supposed to use operator<< which is safer. (I am also not sure what you mean by "C++'s pointer-redirection" since pointers in C++ are the same as in C.) On the other hand lint (and others) can detect this sort of problem when the printf format string is a literal (as it is most of the time). AndrewWPhillips ( talk) 05:05, 9 November 2010 (UTC)
I don't understand why any one would be interested in the historical information regarding the fact that Fortran and COBOL and Multics don't have printf. —Preceding unsigned comment.
I agree. The way Fortran, COBOL, Lisp etc print things has nothing to do with the C's printf statement. Perl, Python, Java etc are relevant as their printing is based on the C function. Algol is probably OK as it was the precursor. AndrewWPhillips ( talk)
Good idea to show how languages that don't have printf do formatting and, in anticipation of perhaps, moving some of this article to formatting article.
DG12 ( talk) 18:19, 17 October 2011 (UTC)
I have removed the extraneous sections. Examples unrelated to printf are unnecessary. Post-C languages that implement printf are also unnecessary thanks to the list at the end. The spiritual predecessors were retained. — Preceding unsigned comment added by Ziphit ( talk • contribs) 19:42, 10 November 2016 (UTC)
In Windows, the *printf functions support %Z and %wZ respectively, corresponding to pointers to the sort-of-documented Windows NT types "ANSI_STRING" and "UNICODE_STRING" respectively. Is it worthwhile mentioning this? —Preceding unsigned comment added by Myria ( talk • contribs) 21:53, 15 March 2010 (UTC)
should we have another page for sprintf with all its args? Umar1996 ( talk) 13:53, 27 September 2010 (UTC)
No, its very closely related. AndrewWPhillips ( talk) 04:47, 9 November 2010 (UTC)
The article implies that snprintf was only added to C in 1999. On the contrary it is very old. It first appeared in UNIX compilers before the first C standard (1989) but after that most compilers renamed it to _snprintf as it was not in the standard library.
AndrewWPhillips ( talk) 04:46, 9 November 2010 (UTC)
The following pages discuss essentially the same topic of format string and its implementations: fwprintf, printf, scanf, vwprintf, printk, swprintf, wprintf. I propose to cleanup these pages by removing the material that fails WP:NOTMANUAL and by merging the remains into Format string. 1exec1 ( talk) 21:35, 8 October 2011 (UTC)
In my opinion, merging can be done after all the pages almost get ready including code samples,usage etc for the ease of editing these pages. Ingaleashwini ( talk) 19:50, 13 October 2011 (UTC)
I believe there is no such thing in wikiland as "after all the pages ... are ready" that is, things are supposed to be always tweaking better and better. DG12 ( talk) 00:54, 15 October 2011 (UTC)
Is it correct that a string cannot be truncated (including trailing spaces) using width (or anything else in the format)? For example
sssm="my shortname " ; sssy="your verylongname "; printf ("~123456789ABC~\n~%12s~\n~%12s~", sssm,sssy)
outputs
~123456789ABC~ ~my shortname ~ ~your verylongname ~
— Preceding unsigned comment added by DGerman ( talk • contribs) 01:12, 15 October 2011 (UTC)
Moved to Talk:String_interpolation#Merge_with_Variable_interpolation.
many languages on the list do not literally have a "printf" intrinsic, and most any language has some more or less roundabout mechanism to achieve similar results. So what exactly is the point of this list? — Preceding unsigned comment added by 75.186.86.53 ( talk) 23:34, 25 March 2015 (UTC)
There were three types of languages in the list:
- printf using the same format string style (e.g. AWK) - a formatting function that had similar capabilities but a different format string style (e.g. AMPL) - a formatting function that is arguably unrelated to the spirit of printf (e.g. Python)
I went through and removed entries that fell under the last two categories Ziphit ( talk) 20:49, 8 November 2016 (UTC)
Why is SQLite not on this list while T-SQL is? Admittedly SQLite is not really a programming language but is there no term for the SQLite-implementation of SQL? HansVB81 ( talk) 17:27, 21 November 2020 (UTC)
There's probably a mathematical explanation for why the # format "flag" character doesn't display 0 like other values, but it makes displaying lists of numbers considerably more complicated, if not slower. I think this would be a good page to explain why this decision was made (I can't find it). Tmellman ( talk) 11:14, 12 September 2016 (UTC)
The redirect
%d has been listed at
redirects for discussion to determine whether its use and function meets the
redirect guidelines. Readers of this page are welcome to comment on this redirect at
Wikipedia:Redirects for discussion/Log/2024 March 17 § %d until a consensus is reached.
Nickps (
talk)
14:00, 18 March 2024 (UTC)
The redirect
Format string has been listed at
redirects for discussion to determine whether its use and function meets the
redirect guidelines. Readers of this page are welcome to comment on this redirect at
Wikipedia:Redirects for discussion/Log/2024 March 18 § Format string until a consensus is reached.
Nickps (
talk)
14:00, 18 March 2024 (UTC)
The redirect
Placeholder (Computing) has been listed at
redirects for discussion to determine whether its use and function meets the
redirect guidelines. Readers of this page are welcome to comment on this redirect at
Wikipedia:Redirects for discussion/Log/2024 March 18 § Placeholder (Computing) until a consensus is reached.
Nickps (
talk)
19:08, 18 March 2024 (UTC)
The redirect
Format specifiers has been listed at
redirects for discussion to determine whether its use and function meets the
redirect guidelines. Readers of this page are welcome to comment on this redirect at
Wikipedia:Redirects for discussion/Log/2024 March 18 § Format specifiers until a consensus is reached.
In response to removal of Tabular output by @ Spitzak who says: Removed this, it is hardly a "limitation", the solution is obvious, and there isn't any better method. The described behavior of the function is definitely what I'd call a limitation, what is that obvious solution? and surely there is a better way. Other than that I agree with you ;)
I recently moved this section from Vulnerabilities to a new section Limitations, since that behavior is a limitation and is not a vulnerability.
But, I'm not going to revert the change since WP doesn't need to be a programmer's guide for the standard C library.
Maybe should describe this behavior under Width field. Stevebroshar ( talk) 12:40, 20 April 2024 (UTC)
%7d %7d %7d
(with spaces) instead of %8d%8d%8d
. However, the how-to section was not appropriate at Wikipedia regardless of the details.
Johnuniq (
talk)
02:19, 21 April 2024 (UTC)
This is the
talk page for discussing improvements to the
Printf article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google ( books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
![]() | This article is rated C-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||||
|
The edits by User:68.100.130.21 on this page were by me. -- Graue 21:31, 11 October 2005 (UTC)
the v-variants need to be explained better. Why are they necessary? I can understand that this has to do with the fact that you cannot simply
char* f(char* s, ...){ printf(s, ...); // what should the arguments be??? }
but a code example for how vprintf solves that would be nice. -- MarSch 13:33, 13 April 2006 (UTC)
In the sprintf example, related to buffer overflows, it says: "If username in the above example exceeds 50 characters in length..." Having 35 characters on username will be enough to overflow the buffer. They forgot to count the characters in "Your name is ", period, newline and terminating null character.
I think it would be very helpful to have an implimentation of printf - how it works at a lower level. I would think that it uses write() at the most basic portable level, but I have no idea where to find if thats true, or how it works. Fresheneesz 22:07, 17 September 2006 (UTC)
According to the spec, printf places its output on the stdout stream (which is a global variable of type FILE*) which is usable with eg fputc, fputs or fwrite. So somewhere along the line, printf must use one of those functions. Here's a link to glibc's implementation of vfprintf (in glibc, vfprintf is called by printf to do the actual work). It's not pretty! olsner 08:39, 14 January 2007 (UTC)
Could some one translate russian article? —The preceding unsigned comment was added by 89.223.67.131 ( talk) 14:00, 14 January 2007 (UTC).
The current explanation is confusing although strictly speaking correct. The statement that the value n is the next argument means that n should be the next argument that printf will parse from its argument list. Because printf at the point when it reads the '*' has not read the data value yet; this means that the width argument should come before the associated data value. Thus, the example is correct. I can't figure out how to re-word this so that it will be clear immediately clear even if the reader doesn't understand how printf works internally. -- 24.226.31.7 05:08, 8 February 2007 (UTC)
echo -n -e "$FOO\t$BAR'
Are the quotations right? I don't think so, but I do not know whether " or ' is correct in Shebang (Unix)? -- Lazer erazer 19:31, 10 April 2007 (UTC)
"
in order to have the $
character assume the appropriate semantics (using '
would've protected the $
from shell interpretation). I fixed. --
tiny plastic Grey Knight
⊖
13:18, 2 August 2007 (UTC)How about some history here? I failed to learn the thing I wanted to learn when I came to read this article: Where did the name "printf" come from? What's the 'f' for? Why isn't it simply named "print"? I remember being originally told that the 'f' stood for 'function', because it was the print function, but that makes little sense since *every* library call in C is a function. It wasn't fopenf() or strcpyf() or mallocf(). So what's the origin of the 'f'?
I would be very interested to know when printf was first introduced. My own memory is that I invented Lisp's "format" without any knowledge of "printf" whatsoever. Unix systems did not show up (at least not prominently) at MIT (at least at the MIT AI Lab) until after "format" was in place. Ken Thompson and Dennis Richie were working on Multics at the time ioa_ was introduced, suggesting strongly that printf was derived from ioa_, as was Lisp's "format". I particularly mention this because in Guy Steele and Richard Gabriel's paper on "The Evolution of Lisp", they say that "format" came from Fortran. When I told Steele that it was from ioa_, he asked whether ioa_ might have been influenced by Fortran. I got in touch with the original author of ioa_, Stan Dunten, who told me that specifiers like "F5.2" are "clearly from Fortran", but not the general idea of the control string with a variable number of arguments. -- DanielWeinreb 26 Oct 2008 —Preceding unsigned comment added by DanielWeinreb ( talk • contribs) 14:39, 26 October 2008 (UTC)
Lua has a %q
specifier in its string.format()
function (which is basically just like PHP's sprintf()
) which accepts a string argument and prints it with all special characters (like quotes, for instance) escaped with
backslashes (no quote delimiters are placed on the result unless you include them in the format string yourself). Does this variant exist in any other languages? Is it worth mentioning? --
tiny plastic Grey Knight
⊖
11:40, 2 August 2007 (UTC)
printf
builtin supports it. —
82.36.30.173 (
talk)
00:47, 10 August 2012 (UTC)I made a new, smaller, tidier lead paragraph, and moved the old one down into a "printf in different languages" section. That bit reads a bit oddly now that it's a section, but then again a lot of the article wouldn't suffer from a rewrite. I think a slightly more language-agnostic approach would be nice, with any particularly notable language idiosyncracies collected into a section lower down. -- tiny plastic Grey Knight ⊖ 13:11, 2 August 2007 (UTC)
The reason that I said that Java's implementation of printf
gives it the functionality of both printf
and fprintf it that it is possible to open a PrintStream object to write to a file and call that object's printf
method to write to that file (similar in practice to fprintf
, but more syntactically similar to printf
). Because
System.err
and (obviously)
System.out
are both PrintStream
objects, they both support printf
. --
Btx40 (
talk)
21:07, 28 April 2008 (UTC)
Should it not be mentioned that Java 1.5 and later also support a form of sprintf
in the form of String.format
method. It does differ in name, but the application of the function is nearly identical. --
Zanthra (
talk)
07:20, 20 May 2008 (UTC)
Then it should also mention MFC's CString::Format. AndrewWPhillips ( talk) 04:58, 9 November 2010 (UTC)
The section on precision uses "*" in the beginning of the sentence, shouldn't it be ".*" instead? The flag ".*" is used in the example printf
statement in the second sentence.
64.94.55.231 (
talk)
18:02, 16 June 2008 (UTC)
I want to replace code like the following (in Java, but PHP and C and C# and C++ are also important ;-) ...
System.out.println("Your age is " + age + " and your weight is " + weight);
with something like this ...
System.out.println("Your age is %int and your weight is %int", age, weight);
Please construct a few examples like this, for the weary programmer-in-a-hurry who doesn't want to wade through several paragraphs of formal specifications and historical detail. Just tell me how to use this functionality. -- Uncle Ed ( talk) 16:11, 23 August 2008 (UTC)
There is distinct controversy over the use of printf in languages that just pass an untyped buffer around and expect the developer to give clear instructions in the other parameters regarding how to divide it up. C and C++ do this, but I don't know how many other languages provide direct interaction with memory the way they do. This becomes especially problematic with C++'s pointer-redirection. It is a common issue to edit the format portion of a printf statement and an integer be accidentally cast as a pointer to string, resulting in crashes that only occur under odd conditions.
Is this something that can be included? Regardless of whether this belongs in the general article on printf, I'd still like to suggest that risks, gotchas, and work-arounds be moved to a discrete section of this article. Robert Rapplean ( talk) 18:35, 8 August 2009 (UTC)
This is a good point, though I will say that C++ only has printf by virtue of being (almost) a superset of C. In C++ you are supposed to use operator<< which is safer. (I am also not sure what you mean by "C++'s pointer-redirection" since pointers in C++ are the same as in C.) On the other hand lint (and others) can detect this sort of problem when the printf format string is a literal (as it is most of the time). AndrewWPhillips ( talk) 05:05, 9 November 2010 (UTC)
I don't understand why any one would be interested in the historical information regarding the fact that Fortran and COBOL and Multics don't have printf. —Preceding unsigned comment.
I agree. The way Fortran, COBOL, Lisp etc print things has nothing to do with the C's printf statement. Perl, Python, Java etc are relevant as their printing is based on the C function. Algol is probably OK as it was the precursor. AndrewWPhillips ( talk)
Good idea to show how languages that don't have printf do formatting and, in anticipation of perhaps, moving some of this article to formatting article.
DG12 ( talk) 18:19, 17 October 2011 (UTC)
I have removed the extraneous sections. Examples unrelated to printf are unnecessary. Post-C languages that implement printf are also unnecessary thanks to the list at the end. The spiritual predecessors were retained. — Preceding unsigned comment added by Ziphit ( talk • contribs) 19:42, 10 November 2016 (UTC)
In Windows, the *printf functions support %Z and %wZ respectively, corresponding to pointers to the sort-of-documented Windows NT types "ANSI_STRING" and "UNICODE_STRING" respectively. Is it worthwhile mentioning this? —Preceding unsigned comment added by Myria ( talk • contribs) 21:53, 15 March 2010 (UTC)
should we have another page for sprintf with all its args? Umar1996 ( talk) 13:53, 27 September 2010 (UTC)
No, its very closely related. AndrewWPhillips ( talk) 04:47, 9 November 2010 (UTC)
The article implies that snprintf was only added to C in 1999. On the contrary it is very old. It first appeared in UNIX compilers before the first C standard (1989) but after that most compilers renamed it to _snprintf as it was not in the standard library.
AndrewWPhillips ( talk) 04:46, 9 November 2010 (UTC)
The following pages discuss essentially the same topic of format string and its implementations: fwprintf, printf, scanf, vwprintf, printk, swprintf, wprintf. I propose to cleanup these pages by removing the material that fails WP:NOTMANUAL and by merging the remains into Format string. 1exec1 ( talk) 21:35, 8 October 2011 (UTC)
In my opinion, merging can be done after all the pages almost get ready including code samples,usage etc for the ease of editing these pages. Ingaleashwini ( talk) 19:50, 13 October 2011 (UTC)
I believe there is no such thing in wikiland as "after all the pages ... are ready" that is, things are supposed to be always tweaking better and better. DG12 ( talk) 00:54, 15 October 2011 (UTC)
Is it correct that a string cannot be truncated (including trailing spaces) using width (or anything else in the format)? For example
sssm="my shortname " ; sssy="your verylongname "; printf ("~123456789ABC~\n~%12s~\n~%12s~", sssm,sssy)
outputs
~123456789ABC~ ~my shortname ~ ~your verylongname ~
— Preceding unsigned comment added by DGerman ( talk • contribs) 01:12, 15 October 2011 (UTC)
Moved to Talk:String_interpolation#Merge_with_Variable_interpolation.
many languages on the list do not literally have a "printf" intrinsic, and most any language has some more or less roundabout mechanism to achieve similar results. So what exactly is the point of this list? — Preceding unsigned comment added by 75.186.86.53 ( talk) 23:34, 25 March 2015 (UTC)
There were three types of languages in the list:
- printf using the same format string style (e.g. AWK) - a formatting function that had similar capabilities but a different format string style (e.g. AMPL) - a formatting function that is arguably unrelated to the spirit of printf (e.g. Python)
I went through and removed entries that fell under the last two categories Ziphit ( talk) 20:49, 8 November 2016 (UTC)
Why is SQLite not on this list while T-SQL is? Admittedly SQLite is not really a programming language but is there no term for the SQLite-implementation of SQL? HansVB81 ( talk) 17:27, 21 November 2020 (UTC)
There's probably a mathematical explanation for why the # format "flag" character doesn't display 0 like other values, but it makes displaying lists of numbers considerably more complicated, if not slower. I think this would be a good page to explain why this decision was made (I can't find it). Tmellman ( talk) 11:14, 12 September 2016 (UTC)
The redirect
%d has been listed at
redirects for discussion to determine whether its use and function meets the
redirect guidelines. Readers of this page are welcome to comment on this redirect at
Wikipedia:Redirects for discussion/Log/2024 March 17 § %d until a consensus is reached.
Nickps (
talk)
14:00, 18 March 2024 (UTC)
The redirect
Format string has been listed at
redirects for discussion to determine whether its use and function meets the
redirect guidelines. Readers of this page are welcome to comment on this redirect at
Wikipedia:Redirects for discussion/Log/2024 March 18 § Format string until a consensus is reached.
Nickps (
talk)
14:00, 18 March 2024 (UTC)
The redirect
Placeholder (Computing) has been listed at
redirects for discussion to determine whether its use and function meets the
redirect guidelines. Readers of this page are welcome to comment on this redirect at
Wikipedia:Redirects for discussion/Log/2024 March 18 § Placeholder (Computing) until a consensus is reached.
Nickps (
talk)
19:08, 18 March 2024 (UTC)
The redirect
Format specifiers has been listed at
redirects for discussion to determine whether its use and function meets the
redirect guidelines. Readers of this page are welcome to comment on this redirect at
Wikipedia:Redirects for discussion/Log/2024 March 18 § Format specifiers until a consensus is reached.
In response to removal of Tabular output by @ Spitzak who says: Removed this, it is hardly a "limitation", the solution is obvious, and there isn't any better method. The described behavior of the function is definitely what I'd call a limitation, what is that obvious solution? and surely there is a better way. Other than that I agree with you ;)
I recently moved this section from Vulnerabilities to a new section Limitations, since that behavior is a limitation and is not a vulnerability.
But, I'm not going to revert the change since WP doesn't need to be a programmer's guide for the standard C library.
Maybe should describe this behavior under Width field. Stevebroshar ( talk) 12:40, 20 April 2024 (UTC)
%7d %7d %7d
(with spaces) instead of %8d%8d%8d
. However, the how-to section was not appropriate at Wikipedia regardless of the details.
Johnuniq (
talk)
02:19, 21 April 2024 (UTC)