lua-users home
lua-l archive

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


>that is,there is one single metatable for all numbers.
Sorry for my poor English, I paid too much attention to this sentence
and ignore the later one in the document.
I fully understand it now. Thank you.

On Sat, Jan 30, 2021 at 3:21 PM Dmitry Meyer <me@undef.im> wrote:
>
> On 30/01/2021 09:27, 孙世龙 sunshilong wrote:
> > By default, a value has no metatable, but the
> > string library sets a metatable for the string type
>
> It clearly says that only the string type has a metatable _by default_
> as it is set by the standard library, but it is possible to set
> metatables for numbers, booleans, etc.