[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.3.0 (work1) now available
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Sat, 6 Jul 2013 15:26:09 -0300
> The only thing I found that appears to be missing is the ability to
> determine the actual type of the number.
One shouldn't need to do this but you can do it as follows:
function isinteger(x)
return tonumber(tostring(x),10)~=nil
end
> It would be nice if there was a method to do so in Lua itself. One use
> case is for serializing integer values to disk in text form properly.
tostring does this already.