Action
Shifts all bits one place to the left or right.
Syntax
ROTATE var , LEFT/RIGHT [ , shifts]
Remarks
Var |
Byte, Integer/Word or Long variable. |
Shifts |
The number of shifts to perform. |
Note that the behavior of ROTATE is just like the ASM RL or RR mnemonic. It works for integer, words, single and longs also. All bits in the variable are preserved so for a byte after 8 rotations, the value will be the same.
See also
Calls
_ROTATE_LEFT or _ROTATE_RIGHT
Example
Dim a as Byte
a = 128
ROTATE a, LEFT , 2
Print a '1