Campbell-scientific CR800 and CR850 Measurement and Control Systems Manual de usuario Pagina 472

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 566
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 471
Appendix A. CRBasic Programming Instructions
472
bits 5-4: value_2
bits 3-0: value_3
Code to extract these values is shown in CRBasic example Using Bit-Shift
Operators
(p. 473).
With unsigned integers, shifting left is equivalent to multiplying by two. Shifting
right is equivalent to dividing by two.
<<
Bitwiseleftshift
Syntax
Variable = Numeric Expression >> Amount
>>
Bitwiserightshift
Syntax
Variable = Numeric Expression >> Amount
&
BitwiseANDassignment‐‐PerformsabitwiseANDofavariablewithan
expressionandassignstheresultbacktothevariable.
A.6.4 Compound-assignment operators
Table 113. 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.
Vista de pagina 471
1 2 ... 467 468 469 470 471 472 473 474 475 476 477 ... 565 566

Comentarios a estos manuales

Sin comentarios