Description
Operator (bitwise); converts
returns a 1 in each bit position where the corresponding bits in
but not both, are 1.
Example
The following example uses the bitwise XOR operator on the decimals 15 and 9 and assigns the
result to the variable
// 15 decimal = 1111 binary
// 9 decimal = 1001 binary
x = 15 ^ 9
trace(x)
// 1111 ^ 1001 = 0110
// returns 6 decimal( = 0110 binary)
^= (bitwise XOR assignment)
Availability
Flash Player 5.
Usage
expression1 ^= expression2
Parameters
expression1,expression2
Returns
None.
Description
Operator (bitwise compound assignment); assigns
. For example, the following two statements are the same:
expression2
x ^= y
x = x ^ y
Example
The following is an example of a ^= operation.
// 15 decimal = 1111 binary
x = 15;
// 9 decimal = 1001 binary
y = 9;
trace(x ^= y);
//returns 6 decimal ( = 0110 binary)
See also
^ (bitwise XOR)
expression1
.
x
Integers and variables.
and
to 32-bit unsigned integers, and
expression2
expression1
expression1
^= (bitwise XOR assignment)
or
expression1
the value of
expression1 ^
,
247
Need help?
Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?