DEFINT A-Z
x = 8
y = shr(x,3)
if y<>1 then print "shr failed"
z = shl(x,2)
if z<>32 then print "shl failed"
END
'shifting bits left
function shl%(x%,howmuch%)
if howmuch%<0 then beep:end
shl% = x% * (2^howmuch%)
end function
'shifting bits to the right
function shr%(x%,howmuch%)
if howmuch%<0 then beep:end
shr% = x% \ (2^howmuch%)
end function