Increment

Wikipedia, the free encyclopedia - Cite This Source

An increment is an increase, either of some fixed amount, for example added regularly, or of a variable amount. For example, a salary may receive an annual increment. A decrease would rather be called a decrement.

Incremental may also refer to gradual change as opposed to massive, instant change.

Use in science and technology

Incremental changes are gradual improvements as opposed to revolutionary, paradigm-breaking changes - i.e. whereas the invention of inner tube tires was only an incremental change to wheels, the invention of the combustion engine was a revolutionary change over animal-drawn vehicles.

Use in programming languages

Incrementing is of constant use in computer programming, such as in loops that iterate through a set of items one at a time.

For example, in JavaScript, the increment operator works like the following:

x++
Where the decrement operator is:
x--

In addition, the increment operator can be written both as x++ and ++x, with separate meanings. For example:
var y = ++x

is shorthand for:
x = x+1
var y = x

however,
var y = x++
is shorthand for:
var y = x
x = x+1

--x instead of x-- follows similar behaviour.

See also



Wikipedia, the free encyclopedia © 2001-2006 Wikipedia contributors (Disclaimer)
This article is licensed under the GNU Free Documentation License.
Last updated on Sunday January 27, 2008 at 18:38:19 PST (GMT -0800)
View this article at Wikipedia.org - Edit this article at Wikipedia.org - Donate to the Wikimedia Foundation