Converting VBScript's Subtraction Operator

Definition: Finds the difference between two numbers or indicates the negative value of a numeric expression.

Subtraction Operator

Actually, no, we don’t know what 22,018 minus 1,915 is. But Windows PowerShell can determine that difference for us; just use the minus sign (-) as the subtraction operator.

$a = 22018 - 1915

Well, what do you know? We were right: the answer is 20103.

Return to the VBScript to Windows PowerShell home page