|
For further information see: http://www.winguides.com/scripting
Arithmetic - Arithmetic Operations
Language: VBScript
Description
VBScript contains a number a built-in arithmetic and mathematical operators that can be used to calculate and compare values.
VBScript makes using arithmetic simple with a standard set of operators and syntaxes.
Operator
|
Function
|
^
|
Exponent
|
/
|
Division
|
*
|
Multiplication
|
Mod
|
Modulus
|
+
|
Addition
|
-
|
Subtraction (and Negation)
|
=
|
Assignment
|
Example
answer = 1 + 1 'equals 2
answer = 139/2 'equals 69.5
answer = (7 - 3) * 10 'equal 40
answer = 7 - 3 * 10 'equals -23 due to precedence
|