Jump to content

off-by-one error

From Wiktionary, the free dictionary

English

[edit]
English Wikipedia has an article on:
Wikipedia

Pronunciation

[edit]
  • Audio (US):(file)

Noun

[edit]

off-by-one error (plural off-by-one errors)

  1. (programming) A logic error where a value, typically the number of iterations of a loop, is specified incorrectly, being either 1 less or 1 more than it should be.
    Synonyms: off-by-one bug, OBOE, OBO
    • 2005, Harvey M. Deitel, Paul J. Deitel, C# for Programmers, second edition, Prentice Hall Professional, →ISBN, page 164:
      Using an incorrect relational operator or an incorrect final value of a loop counter in the loop-continuation condition of a repetition statement causes an off-by-one error.

Translations

[edit]

See also

[edit]