Bitwise Boolean NOT Operator (~) (FPScript)

23.08.2021

Determines the bitwise complement.

Syntax

~ Expression

The syntax of the ~ operator consists of the following elements:

Element

Description

Expression

An integral expression.

Remarks

All bits in Expression are inverted.

All integer data types except Boolean values are permitted.

The operator can process scalar values or entire data series and data matrices. If the argument is a data series or a data matrix, the operation takes place on a per-element basis and the result is once again a data series or a data matrix. If a signal, a signal series or a space curve is used, then only its Y component is processes. The result then contains the X component and possibly the Z component of Expression. If Expression is a list, then the operation is executed for each item in the list and the result is also a list.

Available in

FlexPro View, Basic, Professional, Developer Suite

Example

~0xas

Returns the 16-bit integer value ~1010b = 1111.1111.1111.0101b = -11.

~{True, False}

Returns {False, True}.

 

See Also

Bitwise Boolean OR Operator

Bitwise Boolean Exclusive OR Operator

Bitwise Boolean AND Operator

Logical Boolean NOT Operator

Share article or send as email:

You might be interested in these articles