Bitwise Or Assignment Operator - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

|= bitwise OR assignment operator

expression1 |= expression2
Assigns
expression1
two statements are equivalent:
x |= y;
x = x | y;
Availability: ActionScript 1.0; Flash Player 5
Operands
expression1 : Number
expression2 : Number
Returns
- The result of the bitwise operation.
Number
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); // returns 15 decimal (1111 binary)
See also
& bitwise AND operator
,
operator
^= bitwise XOR assignment operator
bitwise OR assignment operator
the value of
expression1 | expression2
- A number or variable.
- A number or variable.
,
&= bitwise AND assignment operator
,
~ bitwise NOT operator
. For example, the following
operator:
|=)
,
^ bitwise XOR
,
| bitwise OR operator
,
|=
Operators
145

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF