mikroElektronika PIC Microcontrollers PIC12 User Manual page 116

Mikroc user's manual
Table of Contents

Advertisement

mikroC - C Compiler for Microchip PIC microcontrollers
Logical Expressions and Side Effects
General rule with complex logical expressions is that the evaluation of consecutive
logical operands stops the very moment the final result is known. For example, if
we have an expression:
a && b && c
where
important if
place!
Logical vs. Bitwise
Be aware of the principle difference between how bitwise and logical operators
work. For example:
0222222 &
0222222 && 0555555
~ 0x1234
! 0x1234
page
108
is false (0), then operands
a
and
are expressions, as their possible side effects will not take
b
c
0555555
MikroElektronika: Development tools - Books - Compilers
and
will not be evaluated. This is very
b
c
/* equals 000000 */
/* equals 1 */
/* equals 0xEDCB */
/* equals 0 */
mikroC
making it simple...

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?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Pic microcontrollers pic16Pic microcontrollers pic18

Table of Contents