Value (computer science)

In computer science and software programming, a value is the representation of some entity that can be manipulated by a program. The members of a type are the values of that type.[1]

The "value of a variable" is given by the corresponding mapping in the environment.[2] 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.[3]

In declarative (high-level) languages, values have to be referentially transparent. This means that the resulting value is independent of the location of the expression needed to compute the value. Only the contents of the location (the bits, whether they are 1 or 0) and their interpretation are significant.[citation needed]

  1. ^ Mitchell 1996, p. 9.
  2. ^ Aho, Alfred V.; Lam, Monica S.; Sethi, Ravi; Ullman, Jeffrey D. (1986). Compilers: Principles, Techniques, and Tools. Addison-Wesley Publishing Company. ISBN 0-201-10088-6.
  3. ^ Mitchell 1996, pp. 389–390.

© MMXXIII Rich X Search. We shall prevail. All rights reserved. Rich X Search