Rotates a bit pattern left.
Functions:Rol(m,n)
Rol|(m,n)
Rol&(m,n)
Rol%(m,n)
Rol8(m, n)
Operators:m Rol n
m Rol8 n
Assignment:Rol ivar, n
m, n:integer expression
ivar:integer variable
Rol and Rol% shifts the bit pattern of a 32-bit integer expressions m, n places left (Rol = ROtate Left) and "wraps around" the bits moved off the left end to the right end again. The resulting new value is, optionally, stored in a variable. Rol&(m, n) and Rol|(m, n) rotate the bit pattern of a 16-bit or an 8-bit integer expression m respectively, n places left. Ror8 rotates a Large integer.
Rol and Rol8 can be used as operators as well.
Rol ivar, n rotates the value in ivar n places and stores the value back in ivar.
Debug.Show
Local a%, l%, v As Large
Local Int x, y
Trace Bin$(202, 16)
// prints 0000000011001010
Trace Bin$(202 Rol 4, 16)
// prints 0000110010100000
l% = 202 Rol 4
Trace l%
// prints 0000110010100000
Trace Bin(l%, 16)
x = 202, y = 4
Rol x, 4
Trace Bin(x, 16)
// prints 0000110010100000
v = Large 20222022222 Rol8 64
Trace v
// prints 20222022222
{Created by Sjouke Hamstra; Last updated: 22/10/2014 by James Gaite}