Skip to main content

This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Previous sectionNext section

Subtraction Operator (–)

Used to find the difference between two numbers or to indicate the negative value of a numeric expression.

Synopsis

Syntax 1

result = number1-number2

Syntax 2

-number

Arguments

The – operator syntax has these parts:

result Any numeric variable.
number Any numeric expression.
number1 Any numeric expression.
number2 Any numeric expression.

Description

In Syntax 1, the – operator is the arithmetic subtraction operator used to find the difference between two numbers. In Syntax 2, the – operator is used as the unary negation operator to indicate the negative value of an expression.

If an expression is Empty, it is treated as if it were 0.

See Also

FeedbackOpens in a new window