Contents

Elementary errors in arithmetic show a wrong pattern of thought. For example, if a child misplaces the decimal point in some decimal arithmetic, that shows he or she has not understood the idea. By explaining how decimal points should be placed, a teacher can correct all future calculations of this kind. The error is a sign of a general misunderstanding, which, when cured, may never happen again. In this way, errors can help learning.

This idea can be developed in many other subjects. Errors can help learning if corrected, and that is used by many textbooks with end-of-chapter questions. The idea of the questions (which often have end of book answers) is to help the reader find out what needs correcting. The principle of learning is called knowledge of results.

The word 'error' can be used to describe a computer program that was not written in the right way. A syntax error is a bit of source code that does not make sense to the computer. A logic error is a mistake in the algorithm used, which might result in problems with the output.

An error may also be an exception, which is something that happens unexpectedly. For example, it is an error to try to write more files onto a disk that is full. Careful programmers write code that can deal with errors that may happen; they can do this by labeling each error with an error code and using exception handling. Continuing to run a program when an error has not been dealt with can cause error avalanche, which means errors pile up and behavior becomes more difficult to predict.