Re: problem with formatting large integers
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: problem with formatting large integers
- From: Roberto Ierusalimschy <roberto@...>
- Date: 2011年4月15日 17:57:44 -0300
> 4) Modify the current implementation of "string.format" so that all
> "%i" (and "%d") conversions are intercepted and replaced by the
> equivalent "%.0f" conversions, before then calling C's "sprintf".
> This, imho, is the best overall approach.
The problem with this option is that %.0f does not accept the same
options as %i (e.g., "%i.4"). Another, and maybe better, option is
to compile Lua with the LUA_USELONGLONG option (on systems that
support long long).
-- Roberto