Actions

::Value (computer science)

::concepts

Value::computer    L-value::address    Mitchell::l-values    Science::program    Variable::stored    R-value::which

{{ safesubst:#invoke:Unsubst||$N=Refimprove |date=__DATE__ |$B= {{#invoke:Message box|ambox}} }} In computer science, a value is an expression which cannot be evaluated any further (a normal form).{{#invoke:Footnotes|sfn}} The members of a type are the values of that type.{{#invoke:Footnotes|sfn}} For example, the expression 1 + 2 is not a value as it can be reduced to the expression 3. This expression cannot be reduced any further (and is a member of the type Nat) and therefore is a value.

The "value of a variable" is given by the corresponding mapping in the environment.{{ safesubst:#invoke:Unsubst||date=__DATE__ |$B= {{#invoke:Category handler|main}}{{#invoke:Category handler|main}}[citation needed] }} In languages with assignable variables it becomes necessary to distinguish between the r-value (or contents) and the l-value (or location) of a variable.{{#invoke:Footnotes|sfn}}

In declarative (high-level) languages, values have to be referentially transparent. This means that the resulting value is independent of the location in which a (sub-)expression needed to compute the value is stored. Only the contents of the location (the bits, whether they are 1 or 0) and their interpretation are significant.{{ safesubst:#invoke:Unsubst||date=__DATE__ |$B= {{#invoke:Category handler|main}}{{#invoke:Category handler|main}}[citation needed] }}


Value (computer science) sections
Intro  [[Value_(computer_science)?section={{safesubst:#invoke:anchor|main}}Assignment:_l-values_and_r-values|{{safesubst:#invoke:anchor|main}}Assignment: l-values and r-values]]   In assembly language    Notes    References   External links  

PREVIOUS: IntroNEXT: [[Value_(computer_science)?section={{safesubst:#invoke:anchor|main}}Assignment:_l-values_and_r-values|{{safesubst:#invoke:anchor|main}}Assignment: l-values and r-values]]
<<[[Value_(computer_science)?section={{safesubst:#invoke:anchor|main}}Assignment:_l-values_and_r-values|>>]]