Value

Updated: 08/03/2018 by Computer Hope

A value may refer to any of the following:

1. In computer programming, a value is something that is stored in a variable, or object. The value can be numeric or alphanumeric. It may also contain special characters like a dollar sign ($) or pound sign (#). A value can be used for multiple purposes, including calculating a mathematical formula, creating pictures or music, or for displaying the value on a web page or Word document.

$firstvar = 13;
$secondvar = 48;
$total = $firstvar + $secondvar;
print "The total value is: $total\n";

In the program example above, there are three variables: "firstvar" that has a value of "13," "secondvar" that has a value of "48," and the "total" variable that takes the value of both variables to get a value of "61". When this program is run, it will print "The total value is: 61" to the screen.

2. The term value also applies to HTML and CSS. With HTML, an attribute value dictates the setting for an attribute. Likewise, a value does the same for a CSS property.

Accuracy, Object, Programming terms