Campbell-scientific CR800 and CR850 Measurement and Control Systems Uživatelský manuál Strana 473

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 566
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 472
Appendix A. CRBasic Programming Instructions
473
CRBasicExample69. UsingBitShiftOperators
Dim input_val As Long
Dim value_1 As Long
Dim value_2 As Long
Dim value_3 As Long
'read input_val somehow
value_1 = (input_val AND &B11000000) >> 6
value_2 = (input_val AND &B00110000) >> 4
'note that value_3 does not need to be shifted
value_3 = (input_val AND &B00001111)
A.6.5 Logical Operators
AND
Performsalogicalconjunctionontwoexpressions.
Syntax
result = expr1 AND expr2
EQV
Performsalogicalequivalenceontwoexpressions.
Syntax
result = expr1 EQV expr2
NOT
Performsalogicalnegationonanexpression.
Syntax
result = NOT expression
OR
Performsalogicaldisjunctionontwoexpressions.
Syntax
result = expr1 OR expr2
XOR
Performsalogicalexclusionontwoexpressions.
Syntax
result = expr1 XOR expr2
IIF
Evaluatesavariableorexpressionandreturnsoneoftworesultsbasedonthe
outcomeofthatevaluation.
Syntax
Result = IIF (Expression, TrueValue, FalseValue)
IMP
Performsalogicalimplicationontwoexpressions.
Syntax
result = expression1 IMP expression2
Zobrazit stránku 472
1 2 ... 468 469 470 471 472 473 474 475 476 477 478 ... 565 566

Komentáře k této Příručce

Žádné komentáře