Assignment Operators - mikroElektronika PIC Microcontrollers PIC12 User Manual

Mikroc user's manual
Table of Contents

Advertisement

mikroC - C Compiler for Microchip PIC microcontrollers
4. Both of type pointer to qualified or unqualified versions of compatible types.
The resulting type is a pointer to a type qualified with all the type qualifiers of
the types pointed to by both operands.
5. One operand is a pointer, and the other is a null pointer constant. The resulting
type is a pointer to a type qualified with all the type qualifiers of the types
pointed to by both operands.
6. One operand is a pointer to an object or incomplete type, and the other is a
pointer to a qualified or unqualified version of
of the non-pointer-to-

Assignment Operators

Unlike many other programming languages, C treats value assignment as an oper-
ation (represented by an operator) rather than instruction.
Simple Assignment Operator
For a common value assignment, we use a simple assignment operator (=) :
expression1 = expression2
Expression1
expression2
be any expression. The assignment expression itself is not an lvalue.
If
expression1
sion2
Conversions for more information.
Compound Assignment Operators
C allows more comlex assignments by means of compound assignment operators.
Syntax of compound assignment operators is:
expression1 op = expression2
where
page
110
void
is an object (memory location) to which we assign value of
. Operand
expression1
and
expression2
will be converted to the type of
can be one of binary operators
op
MikroElektronika: Development tools - Books - Compilers
void
operand.
has to be a lvalue, and
are of different types, result of the
expression1
,
,
,
,
,
+
-
*
/
%
making it simple...
. The resulting type is that
expression2
expres-
, if necessary. Refer to Type
,
,
,
, or
.
&
|
^
<<
>>
mikroC
can

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PIC Microcontrollers PIC12 and is the answer not in the manual?

This manual is also suitable for:

Pic microcontrollers pic16Pic microcontrollers pic18

Table of Contents