Jump to content

Off-by-one error

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by The Epopt (talk | contribs) at 22:04, 19 January 2002 (from FOLDOC). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

An off-by-one error is 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.



Article based on off-by-one error at FOLDOC, used with permission.