lua-users home
lua-l archive

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


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
--  --  --  --  --  --  --  --  --  --  --  --  --  --