lua-users home
lua-l archive

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


>> https://github.com/lua/lua/blob/master/manual/manual.of
>This is work in progress that does not necessarily correspond to any
>released version of Lua. This is the other dangerous end, and you
>should be equally careful about it.
I see. Thank you.
I can find the same statement in the official version of Lua.
As for as I know, there is no official git or repo, so I have no choice other
than posting the aforementioned repo to show the statement (which I saw in
the officially released version).

>>The same question arises, what does the "slots" mean for Lua?
>There are only 7 mentions of the word "slot" in the manual, and I
>think the second of them defines exactly what it means.
Hmmmm, you mean this one:
Ensures that the stack has space for at least @id{n} extra slots,
that is, that you can safely push up to @id{n} values into it.

If I understand it correctly, the stack contains several slots which can
be used to store numbers and etc. Am I right?
How "slots" are implemented?
How this goal (i.e slots can store several kinds\types of data) is achieved?

Best regards
Sunshilong

On Thu, Sep 24, 2020 at 8:21 PM Viacheslav Usov <via.usov@gmail.com> wrote:
>
> On Thu, Sep 24, 2020 at 2:09 PM 孙世龙 sunshilong <sunshilong369@gmail.com> wrote:
>
> > https://github.com/lua/lua/blob/master/manual/manual.of
>
> This is work in progress that does not necessarily correspond to any
> released version of Lua. This is the other dangerous end, and you
> should be equally careful about it.
>
> > The same question arises, what does the "slots" mean for Lua?
>
> There are only 7 mentions of the word "slot" in the manual, and I
> think the second of them defines exactly what it means.
>
> Cheers,
> V.