lua-users home
lua-l archive

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

This one bit me a couple of days ago:
x = 0
if (x) then doSomethingObnoxious() end
Most of the languages I'm accustomed to would consider x to be false, which had
put me into the bad habit of occasionally using zero when I wanted false.  
Sadly, Lua doesn't consider zero to be false, so my program did something obnoxious.  :)
- Jim