← 返回单词列表
pre-increment
“pre-increment”指在表达式求值之前先把变量加一;作名词时指这种操作,作动词时指执行这种操作。
💡 记忆钩子
把它想成“先加一,再使用”:变量先向上走一步,表达式随后拿到新值。这个核心概念既表示这种操作本身,也表示对变量执行这种操作。
📝 学习建议
- 学习时先记住它与“post-increment”的对比:pre-increment 是先改变变量、后取值,post-increment 则是先取旧值、后改变变量。
- 不要把它理解成普通语境中的“提前增加”;它主要是编程术语,通常涉及表达式中变量的值。
📖 中文释义
noun
-
core 预先递增操作📖 一种先把变量的值加一、再让包含该变量的表达式使用新值的操作;重点是“先加一,再求值”。💡 常见模式是“use pre-increment”或“the pre-increment operator”。在技术说明中,它通常和变量、表达式以及求值顺序一起出现。不要只根据“increment”理解为最终数值增加,还要注意表达式取得的是增加后的值。The pre-increment changes the variable before the expression is evaluated.预先递增会在表达式求值之前改变变量。Use pre-increment when the expression needs the new value immediately.如果表达式需要立即使用新值,就使用预先递增。
pre-increments
plural
verb
-
core 对变量预先递增📖 对变量执行预先递增:先把变量加一,再让当前表达式使用这个新值。💡 常见模式是“pre-increment + 变量”,例如“pre-increment the counter”。它通常用于描述代码的执行行为,主语可以是程序、运算符或程序员。不要漏掉直接宾语,也不要误以为它只说明变量最后变大而不涉及表达式中的取值顺序。transitiveThe loop pre-increments the counter before checking its value.循环会先递增计数器,再检查它的值。
pre-increments
present,singular,third-person
pre-incrementing
participle,present
pre-incremented
participle,past
pre-incremented
past
🌳 词源
由前缀“pre-”(在前)和“increment”(增加、递增)组成,字面意思是“预先递增”。
Proto-Indo-European *per-
Proto-Indo-European *preh₂-
Proto-Indo-European *-i
Proto-Indo-European *préh₂i?
Proto-Italic *prai
Proto-Italic *prai-
Latin prae-lbor.
Middle English pre-
English pre-
English increment
English pre-increment
From pre- + increment.
🔄 变式
pre-incremented
past
pre-incrementing
present
pre-increments
plural
🏷 单词标签 & 词根