网站首页  情感咨询  情感美文  情感百科  情感生活  学习充电  旧版美文

请输入您要查询的词汇:

 

词汇 Fencepost error
分类 英语词汇 英语翻译词典
释义

Fencepost error

中文百科

差一错误 Off-by-one error

(重定向自Fencepost error)

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

英语百科

Off-by-one error 差一错误

(重定向自Fencepost error)

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.

随便看

 

依恋情感网英汉例句词典收录3870147条英语例句词条,基本涵盖了全部常用英语单词的释义及例句,是英语学习的有利工具。

 

Copyright © 2004-2024 Yiyi18.com All Rights Reserved
京ICP备2021023879号 更新时间:2025/8/8 22:38:29