This section provides a quick introduction of arithmetic operations supported by VBScript: addition, subtraction, multiplication, division, remainder, and exponentiation.
VBScript supports 8 arithmetic operations:
Addition (+): Returns the mathematical sum of both operands.
Subtraction (-): Returns the result of the first operand subtracted by the second operand.
Unary Negation (-): Returns the negative value of the only operand.
Multiplication (*): Returns the result of the first operand multiplied by the second operand.
Division (/): Returns the result of the first divided by the second operand.
Integer Division (\): Returns the result of the first operand divided by the second operand.
Both operands are rounded to integer values before the operation.
The decimal fraction part is removed from the resulting value.
Modulus (also called Remainder) (Mod): Returns the remainder of the first operand divided by the second operand.
Both operands are rounded to integer values before the operation.
Exponentiation (^): Returns the first operand raised to the power of the second operand.
To show you some simple arithmetic operations, I wrote the following script, arithmetic_operation.html: