For example,
int x = 10;
we say that \"x
designates an int object which stores 10\". But what does \"designate\" exactly mean? Doe
x
is an identifier.int
object (i.e. a region of storage) containing the value 10
.x
is associated with that int
object.The C standard uses the English word designate to express the relationship between an identifier and the object it identifies. You could say the same thing in several different ways. I said "associate" just now, there are many words we could choose. "x
is a label for this region of memory" would be another way.
Note: designating is not limited to identifiers. Other expressions can designate an object too. For example *(&x)
also designates the same object, as does *(&x + 0)
.
When an expression designates an object, the expression may be used to either assign a value to the object, or retrieve the value from the object. (The same syntax covers both of those cases; it depends on context whether the value is read or written).
The word lvalue means an expression that might designate an object (according to the above definition of 'designate').