[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.3.0 (work1) now available
- From: David Demelier <demelier.david@...>
- Date: Mon, 8 Jul 2013 09:01:21 +0200
2013/7/7 Luis Carvalho <firstname.lastname@example.org>:
>> = isinteger("x")
>> What does this return? I don't have 5.3 handy at the moment.
> true, which is wrong; sorry for the noise and thanks for the heads-up! Better
> isinteger = function(x)
> return type(x) == "number" and not math.isfloat(x)
Since this is very short, I don't see any objections about integrating
into the Lua core instead of writing it each time :-). Also there is
math.isfloat() why not math.isinteger?
Much cleaner, much convenient