next up previous contents index
Next: void Up: Other operands Previous: Other operands

Lvalues and function designators

A difference of opinion within the C community has centered around the meaning of lvalue, one group considering an lvalue to be any kind of object locator, another group holding that an lvalue is meaningful on the left side of an assigning operator. The Committee has adopted the definition of lvalue as an object locator. The term modifiable lvalue is used for the second of the above concepts.

The role of array objects has been a classic source of confusion in C, in large part because of the numerous contexts in which an array reference is converted to a pointer to its first element. While this conversion neatly handles the semantics of subscripting, the fact that a[i] is itself a modifiable lvalue while a is not has puzzled many students of the language. A more precise description has therefore been incorporated in the Standard, in the hopes of combatting this confusion.

3 2 2 2


Pete Jinks
Fri Jan 19 12:31:56 GMT 1996