mikroC
making it simple...
Lvalues
An lvalue is an object locator: an expression that designates an object. An example
of an lvalue expression is
pointer. A modifiable lvalue is an identifier or expression that relates to an object
that can be accessed and legally changed in memory. A const pointer to a constant,
for example, is not a modifiable lvalue. A pointer to a constant can be changed
(but its dereferenced value cannot).
Historically, the l stood for "left", meaning that an lvalue could legally stand on
the left (the receiving end) of an assignment statement. Now only modifiable lval-
ues can legally stand to the left of an assignment operator. For example, if a and b
are nonconstant integer identifiers with properly allocated memory storage, they
are both modifiable lvalues, and assignments such as
legal.
Rvalues
The expression
sion on the left is not related to an object. Such expressions are sometimes called
rvalues (short for right values).
MikroElektronika: Development tools - Books - Compilers
mikroC - C Compiler for Microchip PIC microcontrollers
, where
*P
P
is not an lvalue:
a + b
is any expression evaluating to a non-null
and
a = 1
is illegal because the expres-
a + b = a
are
b = a + b
page
53
Need help?
Do you have a question about the PIC Microcontrollers PIC12 and is the answer not in the manual?