Value

Updated: 06/30/2019 by Computer Hope

A value may refer to any of the following:

In the equation x=1, x is a variable, and 1 is its value.

1. In mathematics and computer programming, a value is a definite object that may be stored in a variable. The value can be numeric (such as an integer, or a floating point number), or alphanumeric (such as a character, or a string). 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