[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Is string always same as number? (the consistency of lua)
- From: steve donovan <steve.j.donovan@...>
- Date: Fri, 11 Feb 2011 13:58:03 +0200
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.
- References:
- Re: Is string always same as number? (the consistency of lua), steve donovan
- Re: Is string always same as number? (the consistency of lua), Axel Kittenberger
- Re: Is string always same as number? (the consistency of lua), steve donovan
- Re: Is string always same as number? (the consistency of lua), Axel Kittenberger
- Re: Is string always same as number? (the consistency of lua), Philippe Lhoste
- Re: Is string always same as number? (the consistency of lua), Xavier Wang
- Re: Is string always same as number? (the consistency of lua), Dirk Laurie
- Re: Is string always same as number? (the consistency of lua), Miles Bader
- Re: Is string always same as number? (the consistency of lua), Miles Bader
- Re: Is string always same as number? (the consistency of lua), Dirk Laurie
- Re: Is string always same as number? (the consistency of lua), Drake Wilson