Extracted from Pike v7.3 release 45 at 2002-06-04.
pike.roxen.com
[Top]

Method `~()


Method `~

mixed `~(object arg)
int `~(int arg)
float `~(float arg)
object(type) `~(object(type)|program arg)
string `~(string arg)

Description

Complement operator.

Returns

The result will be as follows:

arg can have any of the following types:
object

If arg implements lfun::`~(), that function will be called.

int

The bitwise inverse of arg will be returned.

float

The result will be

-1.0 - arg
.

object(type)

The type inverse of arg will be returned.

string

If arg only contains characters in the range 0 - 255 (8-bit), a string containing the corresponding 8-bit inverses will be returned.


See also

`!, lfun::`~()