Difference between revisions of "Variable (computer science)"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(First def.)
(No difference)

Revision as of 10:00, 9 May 2015

In computer programming, a variable or scalar is a storage location paired with an associated symbolic name (an identifier), which contains some known or unknown quantity or information referred to as a value.

The variable name is the usual way to reference the stored value; this separation of name and content allows the name to be used independently of the exact information it represents.

The identifier in computer source code can be bound to a value during run time, and the value of the variable may thus change during the course of program execution.

Comparison with variables in mathematics

Variables in programming may not directly correspond to the concept of variables in mathematics. The value of a computing variable is not necessarily part of an equation or formula as in mathematics.

In computing, a variable may be employed in a repetitive process — assigned a value in one place, then used elsewhere, then reassigned a new value and used again in the same way (see iteration). Variables in computer programming are frequently given long names to make them relatively descriptive of their use, whereas variables in mathematics often have terse, one- or two-character names for brevity in transcription and manipulation.

External Links

  • [ Variable (computer science)] @ Wikipedia