lua-users home
lua-l archive

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


Gerhard Sittig wrote:

Using the operator on something that is not an array has
never been reliable, and the documentation reflects that (the
result could be anything).

The manual states that "The length operator applied on a table returns a border in that table." so it can not retrun anything but any border if there are multiple.

As for the original question:
The border is not defined as an integer but a natural number. Therefore border + 1 will never overflow to a negative number and since maxinteger + 1 is not a valid integer any more it cannot be found in the table and therefore is nil. So maxinteger is always a border if maxinteger has a non nil value. (This is at least how I would read it).

Regards,
Xmilia