lua-users home
lua-l archive

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


2016-07-26 8:55 GMT+02:00 Thomas Jericke <tjericke@indel.ch>:

> As interesting statements like (a = a or 5) are there is
> one thing you always have to remember while programming Lua, testing for
> existence and testing for truth is the same unless you use explicit
> comparison.

Actually, no. 'false' exists but does not test true. In fact, the type 'boolean'
was introduced in Lua starting at Lua 2.1 precisely because a value with
that property was needed.