Abl-electronic PIC Microcontrollers PIC16 Manual do Utilizador Página 116

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 312
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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
Vista de página 115
1 2 ... 111 112 113 114 115 116 117 118 119 120 121 ... 311 312

Comentários a estes Manuais

Sem comentários