[Tutor] A file containing a string of 1 billion random digits.
ALAN GAULD
alan.gauld at btinternet.com
Mon Jul 19 16:14:18 CEST 2010
> 4 and executed many times. Seems the 0 in 0dddd is
> there when a dddd is a 3-digit number such as 123.
> In that case a zero is prefixed to 123 to produce
> 0123. Or if just 23, 2 zeros are prefixed, etc.
> Correct?
Yes, the zero indicates that the string should be padded
with zeros to the length specified. The format string
documentation gives all the details but while zero
padding is fairly common the asterisk is less so, that's
why I explained it but not the zero...I assumed it was
the asterisk that was confusing you...
HTH,
Alan G.
More information about the Tutor
mailing list