Encyclopedia > Off-by-one error

  Article Content

Off-by-one error

An off-by-one error is an exceedingly common computer bug 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 "Obi-Wan error" is a sometimes used as a humorous synonym. The name is derived from the similarity between the phrase "off by one" and the name of the Star Wars character Obi-Wan Kenobi.

See also zeroth.


Article based on off-by-one error (http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=off-by-one+errors) and "Obi-Wan error" at FOLDOC (http://www.foldoc.org), used with permission.



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article

Warning: rtrim(): Invalid '..'-range, '..'-range needs to be incrementing in /var/www/kidsnetau/encyclopedia_promo4.php on line 55

Warning: rtrim(): Invalid '..'-range, '..'-range needs to be incrementing in /var/www/kidsnetau/encyclopedia_promo4.php on line 55
Grateful Dead

... On February 14, 2003, reflecting the reality what was, the band renamed itself The Dead[?], keeping 'Grateful' retired out of respect for Jerry. The adventur ...

 
 
 
This page was created in 25.6 ms