|= (bitwise OR assignment)
Availability
Flash Player 5.
Usage
expression1 |= expression2
Parameters
expression1,expression2
Returns
An integer.
Description
Operator (bitwise compound assignment); assigns
. For example, the following two statements are equivalent:
expression2
x |= y;
x = x | y;
For more information, see "Operator precedence and associativity" in Using ActionScript in Flash.
Example
The following example uses the bitwise OR assignment (
// 15 decimal = 1111 binary
var x:Number = 15;
// 9 decimal = 1001 binary
var y:Number = 9;
// 1111 |= 1001 = 1111
trace(x |= y);
See also
& (bitwise
AND),
assignment),
| (bitwise
A number or variable.
// returns 15 decimal (1111 binary)
&= (bitwise AND
assignment),
OR),
|= (bitwise OR
the value of
expression1
operator:
|=)
^ (bitwise
XOR),
assignment),
~ (bitwise NOT)
expression1 |
^= (bitwise XOR
|= (bitwise OR assignment)
67
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?
Questions and answers