Left Value

The Wiki name for L-value.

A term coined by ChristopherStrachey in his 1967 paper entitled FundamentalConceptsInProgrammingLanguages.

"An L-value represents an area of the store of the computer. We call this a location rather than an address in order to avoid confusion with the normal store-addressing mechanism of the computer. There is no reason why a location should be exactly one machine-word in size the objects discussed in programming languages may be, like complex or multiple precision numbers, more than one word long, or, like characters, less. Some locations are addressable (in which case their numerical machine address may be a good representation) but some are not. Before we can decide what sort of representation a general, non-addressable location should have, we should consider what properties we require of it.

"The two essential features of a location are that it has a content i.e. an associated R-value and that it is in general possible to change this content by a suitable updating operation. These two operations are sufficient to characterise a general location which are consequently sometimes known as Load-Update Pairs or LUPs."

It is so called because it makes up the left hand side of an assignment expression. E.g. in Pascal-like syntax:
 lvalue = rvalue
In Wiki syntax, "R-value" represented as RightValue.


In some, such as ForthLanguage, you can do without L-values. You can do it in a more reasonable way, which is that the ! command takes the address and stores, while @ command takes the address and fetches. (Things like "a=b" in C are slightly strange, as normally a variable name in C will put its value but in this case, the value of "a" is not being used here!) Of course, L-value style (as well as all sorts of other things) is still possible in Forth.


CategoryJargon


EditText of this page (last edited May 21, 2014) or FindPage with title or text search