Abl-electronic PIC Microcontrollers PIC16 Manuel d'utilisateur Page 116

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 312
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 115
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 a is false (0), then operands b and c will not be evaluated. This is very
important if b and c are expressions, as their possible side effects will not take
place!
Logical vs. Bitwise
Be aware of the principle difference between how bitwise and logical operators
work. For example:
0222222 & 0555555
/* equals 000000 */
0222222 && 0555555
/* equals 1 */
~ 0x1234
/* equals 0xEDCB */
! 0x1234
/* equals 0 */
mikroC
- C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...
108
MikroElektronika:
Development
tools
-
Books
-
Compilers
page
Vue de la page 115
1 2 ... 111 112 113 114 115 116 117 118 119 120 121 ... 311 312

Commentaires sur ces manuels

Pas de commentaire