Variable

  1. A value that varies.
  2. When referring to programming, a variable is a location capable of storing temporary data within a program. This data can then be modified, stored, or displayed whenever needed. For example, a program may have a variable named "myvariable" with a default value of 0 or null, and when a user enters data, the variable changes to the data the user entered, or maybe changes the variable to a value letting the program know data has been entered. Below is an example of a variable in the Perl programming language.

$myvariable = "Computer Hope";
print "There is hope, $myvariable";

In the above example the $myvariable has an expression of Computer Hope this variable is then used in the next print line to print: There is hope, Computer Hope.

Also see: %1, Captured variable, Constant, Dependent variable, Environment variable, Expression, Literal, Programming definitions