lua-users home
lua-l archive

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


On Fri, Feb 11, 2011 at 12:31 PM, Drake Wilson <drake@begriffli.ch> wrote:
> Something nobody's mentioned yet is that Lua numeric/string coercion
> in Lua is naturally dependent on the C standard library---which means
> it can be affected by the C locale!  Lua doesn't call setlocale() by
> default, but if any other part of your program does...

Well, that's a definite no-no if it depends on some essentially random event!

I must say I've never used coercion-to-number, always explicit
tonumber() which gives a non-fatal result.

BTW, I like Xavier Wang's map solution; that adaptive definition of
map() is definitely of wider interest.

steve d.