
[Top]
|
Method `^()
- Method
`^
mixed `^(mixed arg1)
mixed `^(object arg1, mixed arg2)
mixed `^(mixed arg1, object arg2)
int `^(int arg1, int arg2)
mapping `^(mapping arg1, mapping arg2)
multiset `^(multiset arg1, multiset arg2)
array `^(array arg1, array arg2)
string `^(string arg1, object(atring) arg2)
object(type) `^(program|object(type) arg1, program|object(type) arg2)
mixed `^(mixed arg1, mixed arg2, mixed ... extras)
- Description
-
Exclusive or operator.
- Returns
If there's a single argument, that argument will be returned.
If there are more than two arguments, the result will be:
`^(`^(arg1, arg2), @extras).
If arg1 is an object that has an lfun::`^, that function
will be called with arg2 as the single argument.
If arg2 is an object that has an lfun::``^, that function
will be called with arg1 as the single argument.
Otherwise the result will be as follows:
arg1 can have any of the following types:
| int | The result will be the bitwise xor of arg1 and arg2.
|
| mapping | The result will be the elements of arg1 and arg2 that
only occurr in one of them.
|
| string | The result will be the pairwise bitwise xor of arg1 and arg2.
|
| object(type) | The result will be the result of
(arg1&~arg2)|(~arg1&arg2).
|
|
- See also
`&(), `|, lfun::`^, lfun::``^
Extracted from Pike v7.3 release 11 at 2001-11-03.
|