decrement 是一个名词和动词,意为"减少、递减"。作为名词,指减少的量或递减的过程;作为动词,指将某个值减少(通常减少一个单位)。在计算机编程中尤为常见,表示将变量的值减一。
/ˈdɛk.rə.mənt/
The counter will decrement by one each time you press the button.
每按一次按钮,计数器就会递减一。
In the loop, the program decrements the variable until it reaches zero, at which point the function terminates gracefully.
在循环中,程序不断递减该变量直到它变为零,届时函数会正常终止。
decrement 源自拉丁语 decrementum,由 decrescere 演变而来,意为"减少、变小"。其中 de- 表示"向下",crescere 表示"生长"。该词在17世纪进入英语,最初用于数学和科学领域,后来在计算机科学中广泛使用,与 increment(递增)相对应。