[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Just curious: Why is tonumber(nil) not 0?
- From: Philippe Lhoste <PhiLho@...>
- Date: Mon, 27 Apr 2009 16:21:30 +0200
On 27/04/2009 15:52, Luiz Henrique de Figueiredo wrote:
If tonumber supported a __tonumber metamethod, this could be simpler.
I was wondering of the use cases, but it can be useful, like:
tonumber("0b01101001")
tonumber("1 456 768") or tonumber("1,456,768") if you prefer
and so on.
--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --