Campbell-scientific CR3000 Micrologger Manual de usuario Pagina 497

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 590
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 496
Appendix A. CRBasic Programming Instructions
497
>>
Bitwiserightshift
Syntax
Variable = Numeric Expression >> Amount
&
BitwiseANDassignment‐‐PerformsabitwiseANDofavariablewithan
expressionandassignstheresultbacktothevariable.
A.6.4 Compound-assignment operators
Table 120. Compound-Assignment Operators
Symbo
l
Name Function
^=
Exponent
assignment
Raises the value of a variable to the power of an expression and
assigns the result back to the variable.
*=
Multiplication
assignment
Multiplies the value of a variable by the value of an expression and
assigns the result to the variable.
+=
Addition
assignment
Adds the value of an expression to the value of a variable and
assigns the result to the variable. Also concatenates a String
expression to a String variable and assigns the result to the
variable.
-=
Subtraction
assignment
Subtracts the value of an expression from the value of a variable
and assigns the result to the variable.
/=
Division
assignment
Divides the value of a variable by the value of an expression and
assigns the result to the variable.
\=
Division integer
assignment
Divides the value of a variable by the value of an expression and
assigns the integer result to the variable.
CRBasicExample71. 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
Vista de pagina 496
1 2 ... 492 493 494 495 496 497 498 499 500 501 502 ... 589 590

Comentarios a estos manuales

Sin comentarios