http://www.freebsd.org/cgi/man.cgi?query=printf&apropos=0&sektion=3&manpath=FreeBSD+7.2-RELEASE&format=html
An optional precision, in the form of
a period . followed by an optional
digit string. If the digit string is
omitted, the precision is taken as
zero. This gives the minimum number
of digits to appear for d, i, o, u,
x, and X conversions, the number of
digits to appear after the
decimal-point for a, A, e, E, f, and F
conversions, the maximum number of
significant digits for g and G
conversions, or the maximum number of
characters to be printed from a string
for s conversions.
因此,%04.4d
,.4
具体规定,所有四位数字都应印制。 当然,<代码>04部分只是按低于1,000的正数排列。 然而,如上述人工页面所示,在这种情况下,
`0 (zero) Zero padding. For all conversions except n, the converted
value is padded on the left with zeros rather
than blanks.
If a precision is given with a numeric
conversion (d, i, o, u, i, x, and X), the 0 flag is
ignored.
既然所有四位数肯定都会转印,那么我的猜测就是,这只是一个左边或打字。 该星号为:<代码>gcc-Wall的汇编器警报。 (见Sinan Unur的例子),但似乎没有实际错误。