Hi Oliver,
On Sat, Dec 18, 2010 at 1:13 AM, Olivier Hallot
<olivier.hallot@documentfoundation.org> wrote:
I have another one which I suspect is wrong:
"Process stopped at iteration %d of %d."
Usually %d is replaced by a value at runtime, so it may show to the user as
"100 of 100", "234 of 234".... i.e. the two numbers will be the same always.
No - they are not the same - the "d" is not a variable name, but a
data-type (%s would be a string, %d is decimal/a number)
Am I wrong?
Yes.
It's used like this for example:
sprintf (buffer, "%d plus %d is %d", a, b, a+b);
first %d is replaced by the value of a, second %d is replaced by the
value of b, and third is replaced by the result of a+b
ciao
Christian
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.