[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Infinity as index
- From: Dirk Laurie <dirk.laurie@...>
- Date: Wed, 23 Apr 2014 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.