|
bitwiseShiftLeft
|
The bitwiseShiftLeft function bitwise left shifts the first Integer
{int1} by the number of bits specified in the second number {int2}
and returns the result as an Integer.
The arguments are assumed to be Integers, and are not checked for the correct type.
Characters and Boolean arguments will be treated as Integers in this function. When to use The bitwiseShiftLeft function is an inexpensive substitute for multiplying
a number if the multiplier is a power of 2. In other words, multiplying a number by 2
(21) s the same as shifting left the number by 1, and multiplying a number by 4 (22)
is the same as shifting left the number by 2, etc.
(bitwiseShiftLeft num1 num2) The result after shifting left the {int1} argument by {int2} times.
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Example_Integer_bitwiseShiftLeft_001
This example shows how the bitwiseShiftLeft function
left shifts the first Integer {int1} by the number of bits specified in
the second number {int2} and returns the result as an Integer.
Here are the links to the data types of the function arguments. Here are also a number of links to functions having arguments with any of these data types.
You can always talk with the AIS at aiserver.sourceforge.net.
Name
Description
AIS Types num1 The Integer to be shifted. Integer Character Boolean num2 The Integer of places to shift left. Integer Character Boolean
Returns:
Examples
Argument Types
Integer
Character
Boolean
How do I contact the AIS team?