Bitwise And Assignment Operator; Bitwise Left Shift Operator - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

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

Advertisement

Table of Contents
loading

Table of Contents