pike.hubbe.net

[Top]
previous`^() `[]()next

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 arg1 only contains characters in the range 0 - 255 (8-bit), a string containing the corresponding 8-bit inverses will be returned.


See also

`!, lfun::`~


Extracted from Pike v7.3 release 11 at 2001-11-03.