EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 245

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING
1130 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
bitXor() 245
Parameters
integer1
Required. The first integer.
integer2 Required. The second integer.
Example
This statement compares the 32-bit binary versions of 5 and 6 and returns the result as an integer:
put bitOr(5, 6)
-- 7
See also
bitNot(), bitAnd(), bitXor()
bitXor()
Usage
bitXor(integer1, integer2)
Description
Function; converts the two specified integers to 32-bit binary numbers and returns a binary
number whose digits are 1’s in the positions where the given numbers’ digits do not match, and
0’s in the positions where the digits are the same. The result is the new binary number, which
Lingo displays as a base 10 integer.
In JavaScript syntax, use the bitwise operator "
^".
Parameters
integer1
Required. The first integer.
integer2 Required. The second integer.
Example
This statement compares the 32-bit binary versions of 5 and 6 and returns the result as an integer:
put bitXor(5, 6)
-- 3
See also
bitNot(), bitOr(), bitAnd()
Integer Binary number (abbreviated)
50101
60110
Result
30011

Related product manuals