lua-users home
lua-l archive

Re: Infinity as index

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


2014年04月23日 11:53 GMT+02:00 Lukas Prokop <admin@lukas-prokop.at>:
> Now my point is that we can use this as indices.
I misunderstood your point. You mean indices for the string library,
not indexing in a table. In that case, indices are converted to integers.
 The Lua value must be an integer, or a number or string convertible
 to an integer (see §3.4.3); otherwise, lua_tointegerx returns 0.
Since infinity is not an integer, it is treated as 0.

AltStyle によって変換されたページ (->オリジナル) /