lua-users home
lua-l archive

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

On Fri, Feb 3, 2017 at 9:25 AM, Xianfu Pan <> wrote:
> 2017-01-27 21:22 GMT+08:00 Kim Alvefur <>:
>>     type(1.0) -> "number", "float"

Changing a basic function like `type` to return more than one value
can cause strange problems.

t = {type(1.0}

So #t becomes 2, not 1.  This also bites when calling type() as the
last argument of a function. Then to be sure, need to say (type(v)) to
discard the second value.