Difference between revisions of "Variable (computer science)"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(See also)
 
(2 intermediate revisions by the same user not shown)
Line 20: Line 20:
 
* [[Data (computing)]]
 
* [[Data (computing)]]
 
* [[Data type]]
 
* [[Data type]]
 +
* [[Free variables and bound variables]]
 
* [[Iteration (computing)]]
 
* [[Iteration (computing)]]
 
* [[Name binding]]
 
* [[Name binding]]
 
* [[Namespace]]
 
* [[Namespace]]
 +
* [[PHP variable]]
 
* [[String (computer science)]]
 
* [[String (computer science)]]
 +
* [[Value (computer science)]]
 
* [[Variable (mathematics)]]
 
* [[Variable (mathematics)]]
  

Latest revision as of 18:40, 20 September 2016

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.

Description

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 (computing).

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