翻訳と辞書
Words near each other
・ ValuJet Flight 592
・ Valuk
・ Valuk (duke)
・ Valuka Iswar
・ Valukas
・ Valukkai Aru
・ Valukkupparai
・ Valume Nob
・ Valun
・ Valun tablet
・ Valupey Rural District
・ Valups
・ Valur
・ Valucha deCastro
・ Value
Value (computer science)
・ Value (economics)
・ Value (ethics)
・ Value (law)
・ Value (marketing)
・ Value (mathematics)
・ Value (personal and cultural)
・ Value (poker)
・ Value (semiotics)
・ Value added
・ Value added selling
・ Value added tax (Nepal)
・ Value Added Tax Act 1994
・ Value Added Tax Service
・ Value addition based pricing


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Value (computer science) : ウィキペディア英語版
Value (computer science)

In computer science, a value is an expression which cannot be evaluated any further (a normal form). The members of a type are the values of that type. 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. 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.
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.
==Assignment: l-values and r-values==
Some languages use the idea of l-values and r-values. L-values have storage addresses that are programmatically accessible to the running program (e.g., via some address-of operator like "&" in C/C++), meaning that they are variables or dereferenced references to a certain memory location. R-values can be l-values (see below) or non-l-values—a term only used to distinguish from l-values. Consider the C expression 4 + 9. When executed, the computer generates an integer value of 13, but because the program has not explicitly designated where in the computer this 13 is stored, the expression is an r-value. On the other hand, if a C program declares a variable x and assigns the value of 13 to x, then the expression x has a value of 13 and is an l-value.
In C, the term l-value originally meant something that could be assigned to (hence the name, indicating it is on the left side of the assignment operator), but since the reserved word const (constant) was added to the language, the term is now 'modifiable l-value'. In C++11 a special semantic-glyph && exists, to denote the ''use/access of the expression's address for the ''compiler'' only''; i.e., the address cannot be retrieved using the address-of, &, operator during the ''run-time'' of the program (see the use of move semantics).
This type of reference can be applied to ''all'' r-values including non-l-values as well as l-values. Some processors provide one or more instructions which take an immediate value, sometimes referred to as "immediate" for short. An immediate value is stored as part of the instruction which employs it, usually to load into, add to, or subtract from, a register. The other parts of the instruction are the opcode, and destination. The latter may be implicit. (A non-immediate value may reside in a register, or be stored elsewhere in memory, requiring the instruction to contain a direct or indirect address (index register address ) to the value.)
The l-value expression designates (refers to) an object. A non-modifiable l-value is addressable, but not assignable. A modifiable l-value allows the designated object to be changed as well as examined. An r-value is any expression, a non-l-value is any expression that is not an l-value. One example is an "immediate value" (look below) and consequently not addressable.
The notion of l-values and r-values was introduced by CPL. The notions in an expression of r-value, l-value, and r-value/l-value are analogous to the parameter modes of input parameter (has a value), output parameter (can be assigned), and input/output parameter (has a value and can be assigned), though the technical details differ between contexts and languages.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Value (computer science)」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.