Re: Infinity as index
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Infinity as index
- From: Dirk Laurie <dirk.laurie@...>
- Date: 2014年4月23日 17:56:37 +0200
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.