Negation Operator (-) (FPScript)

23.08.2021

Negates an expression.

Syntax

- Expression

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

Element

Description

Expression

Any expression. All numerical data types and the time span data type are allowed.

Remarks

The operator can process scalar values or entire data series and data matrices. If Expression is a data series or a data matrix, the negation 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 negated, only the Y component is processed. The result then contains the unchanged 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.

You can apply the operator to all real and complex data types. For complex numbers, the real part and the imaginary part are negated separately. The result always has the same data type as Expression.

If Expression is a quantity, then its unit is taken and the result is also a quantity.

Available in

FlexPro View, Basic, Professional, Developer Suite

See Also

Subtraction Operator (-)

Share article or send as email:

You might be interested in these articles