- A value that varies.
- When referring to programming, a
variable is a location capable of storing temporary data within a program. This data
can then be modified, stored, and/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: Constant, Dependent
variable, Expression,
Literal, Programming
definitions
|
|
| Resolved | Were you able to locate the answer to your questions? |
|
|