因此, 通过给table设置元表, 并为其元定义 __add 元方法, 即可实现该table的加法运算. 设置元表/ 获取元表. setmetatable(table, metatable) - 设置元表.
確定! 回上一頁