lua-users home
lua-l archive

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


> Not a value can be none of greater than, equal to or less than a number.
>
> Lua's default behavior with respect to NaN is based on standards
> compliance - IEEE 754 as cited in PiL 13.2.

Dirk didnt mean what it does in comparisons, you are correct the
standard covers this. But Lua allows _any_ variable to be used in
logical algebra by itself only, where so far false and nil behave as
logical false, everything else as logical true.

local v = 1 / 0
if v then
  print("it is true!")
else
  print("it is false!")
end

what should it do?