lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> 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