请输入您要查询的英文单词:

 

单词 metamethod
释义
metamethod
  • 简明释义
  • n.元方法:在编程语言(如Lua)中,元方法是一种特殊的方法,用于定义对象之间的操作行为。元方法可以用于重载运算符,实现自定义的算术、比较和其他操作。
  • 网络释义
  • 1

    ?元方法

    table访问的元方法等内容,需要的朋友可以参考下Lua中提供的元表(metatable)与元方法(metamethod)是一种非常重要的 ..

短语
  • 双语例句
  • 1
    Function mt.__add() is a metamethod that appends the string b to the string found in a.value b times.
    函数 mt.__add() 是一个元方法,它将字符串 b 添加到在 a.value 中找到的字符串后面 b 次。
  • 2
    The metamethod for __index is called whenever a key doesn't exist in a table. Here's an example that "memoizes," or remembers, the value of a function
    __index 的元方法每当表中不存在键值时就会被调用。
  • 词源
1

metamethod:

meta- +? method

FROM: wiktionary
随便看

 

英汉双解词典包含3185865条英汉词条,基本涵盖了全部常用单词的翻译及用法,是英语学习的有利工具。

 

Copyright © 2004-2022 Newdu.com All Rights Reserved
更新时间:2025/2/11 11:12:08