User Guide
126 ActionScript language elements
&= bitwise AND assignment operator
expression1 &= expression2
Assigns expression1 the value of expression1& expression2. For example, the following
two expressions are equivalent:
x &= y;
x = x & y;
Availability: ActionScript 1.0; Flash Lite 2.0
Operands
expression1 : Number - A number.
expression2 : Number - A number.
Returns
Number - The value of expression1 & expression2 .
Example
The following example assigns the value
9 to x:
var x:Number = 15;
var y:Number = 9;
trace(x &= y); // output: 9
See also
& bitwise AND operator, ^ bitwise XOR operator, ^= bitwise XOR assignment
operator
, | bitwise OR operator, |= bitwise OR assignment operator, ~ bitwise
NOT operator
<< bitwise left shift operator
expression1 << expression2
Converts expression1 and expression2 to 32-bit integers, and shifts all the bits in
expression1 to the left by the number of places specified by the integer resulting from the
conversion of
expression2. The bit positions that are emptied as a result of this operation are
filled in with 0 and bits shifted off the left end are discarded. Shifting a value left by one
position is the equivalent of multiplying it by 2.