SoFunction
Updated on 2025-03-10

VBS tutorial: Operator-minus operator (-)

Subtraction operator (-)

Calculate the difference between two numeric values ​​or represents the negative value of the numeric expression.

Syntax 1

result = number1-number2

Syntax 2

-number

parameter

result

Any numerical variable.

number

Any numeric expression.

number1

Any numeric expression.

number2

Any numeric expression.

illustrate

In Syntax 1, the - operator is an arithmetic subtraction operator used to calculate the difference between two numeric values. In Syntax 2, the - operator is used as a monolog inverse operator, indicating the negative number of the expression.

If one or both expressions are Null expressions,resultforNull. If an expression is Empty, it is processed as 0.

Require