Extracted from Pike v7.3 release 53 at 2002-09-10.
pike.ida.liu.se
[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, atring arg2)
type `|(program|type arg1, program|type arg2)
mixed `|(mixed arg1, mixed arg2, mixed ... extras)

Description

Bitwise or/join 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 binary or of arg1 and arg2.

mapping|multiset

The result will be the join of arg1 and arg2.

array

The result will be the concatenation of arg1 and arg2.

string

The result will be the pairwise bitwose or of arg1 and arg2.

type|program

The result will be the type join of arg1 and arg2.


See also

`&(), lfun::`|(), lfun::``|()