Re: Lua 5.3 work1 Considering math.isinteger or type()
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Lua 5.3 work1 Considering math.isinteger or type()
- From: Andrew Starks <andrew.starks@...>
- Date: 2013年7月19日 13:20:34 -0500
On Friday, July 19, 2013, Joshua Jensen wrote:
----- Original Message -----
From: steve donovan
Date: 7/19/2013 10:25 AM
On Fri, Jul 19, 2013 at 6:01 PM, Dirk Laurie
<dirk.laurie@gmail.com>
wrote:
print(type(1))
number integer
Ah, but suddenly a function which has only
returned one value returns two .. here again I'm reminded
of the special care one must take with string.gsub.
Better it be a different function, then.
print(type(1, 'subtype'))
number integer
???
-Josh
Or the possibly buggy approach of:
types(1)
number, integer
I think subtype is very nice, but I overload type to work with hierarchies of types (more than two). Subtype could be used in the same way, but it struck me as singular, like type is.
- Andrew