off-by-one error

Computing Dictionary

off-by-one error definition

programming
(Or "Obi-Wan error") An exceedingly common error induced in many ways, such as by starting at zero when you should have started at one or vice-versa, or by writing "< N" instead of "<= N" or vice-versa. Often confounded with fencepost error, which is properly a particular subtype of it.
The term zeroth corrects the linguistic off-by-one error of, e.g., referring to the "1st" element of an array whose indexes start from zero.
[Jargon File]
(1998-09-21)

The Free On-line Dictionary of Computing, © Denis Howe 2010 http://foldoc.org
Cite This Source
Explore Dictionary.com
Previous Definition: off-budget
Next Definition: off-camera
Words Near: off-by-one error
More from Thesaurus.com
Synonyms and Antonyms for off-by-one error
More from Reference.com
Search for articles containing off-by-one error
Dictionary.com Word FAQs

Dictionary.com presents 366 FAQs, incorporating some of the frequently asked questions from the past with newer queries.

Copyright © 2014 Dictionary.com, LLC. All rights reserved.
  • Please Login or Sign Up to use the Recent Searches feature