Rockwell-automation FactoryTalk View Site Edition Users Guide Manuale Utente Pagina 555

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 696
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 554
20 CREATING EXPRESSIONS
20–9
• • • • •
20 • Placeholder
Example: Bitwise operators
For these examples tag1=5 (binary 0000 0000 0000 0101) and tag2=2 (binary 0000 0000
0000 0010)
tag1&tag2
Returns 0 (binary 0000 0000 0000 0000)
tag1|tag2
Returns 7 (binary 0000 0000 0000 0111)
tag1^tag2
Returns 7 (binary 0000 0000 0000 0111)
tag1>>1
Returns 2 (binary 0000 0000 0000 0010)
tag1<<1
Returns 10 (binary 0000 0000 0000 1010)
~tag1
Returns6 (binary 1111 1111 1111 1010)
Evaluation order of operators
In expressions with more than one operator, evaluation order is determined as follows:
Operators in parentheses are evaluated first. Use parentheses to change the order.
Two operators of the same precedence are evaluated from left to right.
Operators not enclosed in parentheses are evaluated as follows:
Evaluation order Symbols
1 (highest) ()
2NOT
~
Vedere la pagina 554
1 2 ... 550 551 552 553 554 555 556 557 558 559 560 ... 695 696

Commenti su questo manuale

Nessun commento