lua-users home
lua-l archive

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


Ben Sunshine-Hill wrote:
> Worse yet, given Lua's willingness to go between numbers and their
> string representations, if 0==false, then it would be best to define
> that "0"==false. (And that "0e-3" be false, although "0f-3" would be
> true.) Yikes.

Automatic conversion of strings to numbers occurs only for arithmetic
operations. In other contexts 0 and "0" are different, like equality
tests or table indexing. If this were to change, it would be a real
nightmare (for me at least).

Regards,
Holger Stenger