Campbell-scientific CR800 and CR850 Measurement and Control Systems Manuel d'utilisateur Page 473

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 566
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 472
1 2 ... 468 469 470 471 472 473 474 475 476 477 478 ... 565 566

Commentaires sur ces manuels

Pas de commentaire