Polarity Sign Operator (#) (FPScript)

23.08.2021

Determines a code number for the polarity sign of an expression.

Syntax

# Expression

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

Element

Description

Expression

Any expression. All real data types and the calendar time data type are permitted.

Remarks

Returns 1 when Expression is greater than zero, 0 when Expression is equal to zero, and -1 when Expression is less than zero.

The operator can process scalar values or entire data series and data matrices. If Expression is a data series or a data matrix, the application takes place on a per-element basis and the result is once again a data series or a data matrix. If the operator is applied to a signal, a signal series or a space curve, only the Y component is examined. 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.

The result always has the same data type as Expression.

If Expression is a quantity, then its unit is ignored and not taken.

Available in

FlexPro View, Basic, Professional, Developer Suite

See Also

Multiply Operator (#)

Share article or send as email:

You might be interested in these articles