Difference between revisions of "Variable (computer science)"
Karl Jones (Talk | contribs) (etc) |
Karl Jones (Talk | contribs) (→See also) |
||
Line 15: | Line 15: | ||
== See also == | == See also == | ||
+ | * [[Data (computing)]] | ||
+ | * [[Data type]] | ||
+ | * [[Name binding]] | ||
+ | * [[Namespace]] | ||
* [[String (computer science)]] | * [[String (computer science)]] | ||
+ | * [[Variable (mathematics)]] | ||
== External links == | == External links == | ||
* [https://en.wikipedia.org/wiki/Variable_(computer_science) Variable (computer science)] @ Wikipedia | * [https://en.wikipedia.org/wiki/Variable_(computer_science) Variable (computer science)] @ Wikipedia |
Revision as of 04:20, 31 August 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.
See also
External links
- Variable (computer science) @ Wikipedia