差一错误
Sign in to saveAlso known as fencepost error, fencepost problem, fence post error, fence post problem
type of numerical or counting error
In the Vinony graph
Vinony's link graph records 28 inbound references to 差一错误, and connects out to C string handling, control flow and program loop.
It is catalogued under the topic Software bugs.
Vinony links it to 17 Wikipedia language editions.
Wikidata facts
- Subclass of
- logic error
Show 1 more fact
- Stack Exchange tag
- stackoverflow.com/tags/off-by-one
Sources (3)
via Wikidata · CC0
Article · 中文
差一错误(英語:Off-by-one error,缩写OBOE)是在计数时由于边界条件判断失误导致结果多了一或少了一的错误,通常指计算机编程中循环多了一次或者少了一次的程序错误,属于逻辑错误的一种。比如,程序员在循环中进行比较的时候,本该使用「小于等于」,但却使用了「小于」,或者是程序员没有考虑到一个序列是从0而不是1开始(许多程序语言的数组下标都是这样)。在数学领域,此错误也时有发生。
Abstract from DBpedia / Wikipedia · CC BY-SA
Connections
C string handling
Entity
control flow
Entity
program loop
Entity
mathematics
Entity
International Standard Book Number
Entity
Julian calendar
Entity
computer programming
Entity
Pascal
Entity
Vitruvius
Entity
fence
Entity
MATLAB
Entity
interval
Entity
University of Texas at Austin
Entity
pigeonhole principle
Entity
Fordham University
Entity
C standard library
Entity
endianness
Entity
call stack
Entity
linear interpolation
Entity
Zeitpyramide
Entity