[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to exchange the values of a specific variable (e.g: maybe a table) between Lua_States?
- From: Sean Conner <sean@...>
- Date: Fri, 7 May 2021 14:17:20 -0400
It was thus said that the Great 孙世龙 sunshilong once stated:
> >From Sean Conner:
>
> >Or try CBOR [1]. My implementation [2][3] can handle keys other than
> >strings or integers, and can even handle cycles in tables. Encoding this
> >table:
> >
> > local x
> > x =
> > {
> > [1] = true,
> > [false] = "nah",
> > [true] = "one",
> > [42] = "meaning of life",
> > [math.pi] = 3.000000,
> > [math.huge] = 'too large',
> > [math.maxinteger] = 'this is fine',
> > ['NaN'] = 0/0,
> > [0] = false,
> > }
> >
> >is no issue. [5]
> What about such tables:
> Tab = {}
> Tab.self = Tab;
Yes, it can handle that. It can even handle:
Tab = {}
Tab[Tab] = Tab
-spc