This is an old revision of the document!


Since version 2.1


lshift(<byte or int expression> [, <byte positions>])

The LSHIFT() function shifts each bit in expression to the left by the number of positions and returns the result of the operation.

The second argument can be omitted and it defaults to 1.

Performance tip

Shifting the bits to the left is equivalent to multiplying with powers of two, however much faster. Example:

rem -- this is slow
x = 75
y = x * 4

rem -- this is fast
x = 75
y = lshift(x, 2)
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies


Enter your comment. Wiki syntax is allowed: