- Operator

Computes the difference of two numbers or the negative of a number.

Syntax

Binary form

expression_1 - expression_2

Unary form

- expression_1

Parts

expression_1
Necessary numeric expression
expression_2
Necessary in the binary form; a numeric expression

Instructions

The binary - operator subtracts the value of expression_2 from the value of expression_1 and returns the difference.

The unary - operator negates the value of expression_1. If the value is positive, it returns a negative value. If the value is negative, it returns a positive value. If the value is zero, it returns zero.

Examples

See also