Unary Arithmetic Operators

InstallShield 2020 ยป InstallScript Language Reference

Unary operators are arithmetic operators that perform an action on a single operand. The InstallScript compiler recognizes two unary operators, negative ( - ) and positive ( + ).

Negative

The negative unary operator reverses the sign of an expression from positive to negative or from negative to positive. The net result of using the negative unary operator before an expression is the same as multiplying the expression by -1.

Positive

The positive unary operator has the same net result on an expression as multiplying that expression by 1. It does not change the sign of a negative number to positive.

See Also