lua-users home
lua-l archive

Re: Why does #{nil, "sun"} output 2, whereas a={}; a[2]="sun"; print(#a) output 0?

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


On Mon, Oct 12, 2020 at 10:23 AM Robert Burke <sharpobject@gmail.com> wrote:
> For tables, == will just tell you whether a and b are the same table
... when no __eq metamethod is defined. See the manual for a full specification.
Cheers,
V.

AltStyle によって変換されたページ (->オリジナル) /