ROTATE statement

Purpose

Rotate the bits in an integral-class variable.

Syntax

ROTATE {LEFT | RIGHT} ivar, count

Remarks

ivar must be one of the integral-class variable types: Byte, Word, Integer, Double-word, Long-integer, or Quad-integercount is the number of bits by which to rotate ivar.  ROTATE rotates all the bits in ivar without special regard to the sign bit of a signed integral-class variable.

See also

BIT functionBIT statementBITS, SHIFT

Example

i? = 221            ' binary: 1 1 0 1 1 1 0 1

ROTATE RIGHT i?, 1  ' binary: 1 1 1 0 1 1 1 0