lua-users home
lua-l archive

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


> The manual should probably mention that NaN, like nil, is not an
> acceptable index for setting values

Lua does not depend in IEEE 754 and so does not mention NaN (of Inf) at all.

> but is ok for reading values (unlike nil)?

Is it? I mean, the code below does work (and prints nil) but it wouldn't
print anything else even if you did put a value associated to a Nan key.
	a=0/0 ; t={} ; print(t[a])

Anyway, NaN is a mess that we don't want to get into.