Off-by-one Error
An off-by-one error (OBOE) is a logic error involving the discrete equivalent of a boundary condition. It often occurs in computer programming when an iterative loop iterates one time too many or too few. This problem could arise when a programmer makes mistakes such as using "is less than or equal to" where "is less than" should have been used in a comparison or fails to take into account that a sequence starts at zero rather than one (as with array indices in many languages). This can also occur in a mathematical context.
Read more about Off-by-one Error: Looping Over Arrays, Fencepost Error, Security Implications
Famous quotes containing the word error:
“There is a lot of difference between tempting and leading into error. God tempts but does not lead into error. To tempt is to provide opportunities for us to do certain things if we do not love God, but putting us under no necessity to do so. To lead into error is to compel a man necessarily to conclude and follow a falsehood.”
—Blaise Pascal (16231662)