网站首页  英汉词典

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

 

单词 Fencepost problem
释义

Fencepost problem

中文百科

差一错误 Off-by-one error

(重定向自Fencepost problem)

差一错误英语:Off-by-one error,缩写OBOE)是在计数时由于边界条件判断失误导致结果多了一或少了一的错误,通常指计算机编程中循环多了一次或者少了一次的进程错误,属于逻辑错误的一种。比如,进程员在循环中进行比较的时候,本该使用「小于等于」,但却使用了「小于」,或者是进程员没有考虑到一个串行是从0而不是1开始(许多进程语言的数组下标都是这样)。在数学领域,此错误也时有发生。

英语百科

Off-by-one error 差一错误

(重定向自Fencepost problem)

An off-by-one error (OBOE), also commonly known as an OBOB (off-by-one bug), is a logic error involving the discrete equivalent of a boundary condition. It often occurs in computer programming when an iterative loop iterates one time too many or too few. This problem could arise when a programmer makes mistakes such as using "is less than or equal to" where "is less than" should have been used in a comparison or fails to take into account that a sequence starts at zero rather than one (as with array indices in many languages). This can also occur in a mathematical context.

随便看

 

英汉网英语在线翻译词典收录了3779314条英语词汇在线翻译词条,基本涵盖了全部常用英语词汇的中英文双语翻译及用法,是英语学习的有利工具。

 

Copyright © 2004-2024 encnc.com All Rights Reserved
更新时间:2025/6/22 20:17:18