• Subject: Re: Length operator description when border is max integer
• From: Halalaluyafail3 <luigighiron@...>
• Date: Sun, 9 Jan 2022 14:03:53 -0500

```> 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).
I read it as being a Lua expression, so I assumed wrap-around behavior.
If it is interpreted as being an operation on a natural number, the
same problem will arise if one larger than the maximum integer is
representable as a float.
Would a float which represents a positive integer be considered a
valid integer or a natural number?

On Sun, Jan 9, 2022 at 1:20 PM Xmilia Hermit <xmilia.hermit@gmail.com> wrote:
>
> 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

```