Elmomc Multi-Axis Motion Controller-Maestro Manuel d'utilisateur Page 80

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 313
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 79
5.4.1.4.4 MAXL Shift Operators
The bitwise shift operators are:
Right shift (>>)
Left shift (<<)
These binary operators have left-to-right associativity.
Syntax
shift-expression :
expression << expression
expression >> expression
expression:
additive-expression
Both operands of the shift operators must be integer types. The type of the result is the
same as the type of the left operand. The value of a right-shift expression e1 >> e2 is e1
/ 2
e2
, and the value of a left-shift expression e1 << e2 is e1 * 2
e2
.
The results are undefined if the right operand of a shift expression is negative or if the
right operand is greater than or equal to the number of bits in the (promoted) left
operand.
The left-shift operator causes the bit pattern in the first operand to be shifted left by
the number of bits specified by the second operand. Bits vacated by the shift operation
are zero-filled. This is a logical shift, as opposed to a shift-and-rotate operation.
The right-shift operator causes the bit pattern in the first operand to be shifted right
the number of bits specified by the second operand. Bits vacated by the shift operation
are zero-filled for unsigned quantities. For signed quantities, the sign bit is propagated
into the vacated bit positions. The shift is a logical shift if the left operand is an
unsigned quantity; otherwise, it is an arithmetic shift.
Maestro Software Manual MAXL Program Language
MAN-MASSW (Ver. Q)
5-18
Vue de la page 79
1 2 ... 75 76 77 78 79 80 81 82 83 84 85 ... 312 313

Commentaires sur ces manuels

Pas de commentaire