Page 1 of 1
Lua lied to me :(
Posted: Fri Jul 12, 2013 6:21 am
by LuaWeaver
Well, this happened.
That errors, of course:
>'for' limit must be a number
So I go and do this:
That doesn't error! Now, go:
nan is not a number, so why is for letting me use it as a limit?
Re: Lua lied to me :(
Posted: Fri Jul 12, 2013 7:07 am
by slime
LuaWeaver wrote:nan is not a number, so why is for letting me use it as a limit?
Ah, but it is!
http://en.wikipedia.org/wiki/NaN#Encoding
Re: Lua lied to me :(
Posted: Fri Jul 12, 2013 2:32 pm
by raidho36
Reminds me of:
> issue #666: LÖVE crashes when I try to crash it.
Re: Lua lied to me :(
Posted: Fri Jul 12, 2013 6:52 pm
by T-Bone
I've never thought of this before. It's kind of like Wine except even more obvious
Re: Lua lied to me :(
Posted: Fri Jul 12, 2013 6:57 pm
by Xgoff
ieee probably should have called it something else, like "not representable" or something
reminds me of a past thread on the lua mailing list where someone suggested lua expressions that would have resulted in nan should return nil instead, because "not a number". NOPE.