VBScript Operators
ARITHMATIC Operators…
- is the the first major class of operators is arithmetic operators. Arithmetic operators
- enable you to perform simple arithmetic operations on one or more variables.
Operation | Operator | Example |
Addition | + | 2 + 1 = 3 |
Subtraction | – | 28-3 = 25 |
Multiplication | * | 3 * 2 = 6 |
Floating-point Division | / | 4.8/2 = 2.4 |
Exponentiation | ^ | 3^2 = 9 |
Negation | – | -18 |
Integer Division | \ | 4.8 \ 2 = 2 |
Remainder Division | MOD | 5 MOD 2 |
Note: The floating-point division operator is designed to divide values with decimal points, but it can also divide numbers without decimals.
COMPARISON Operators… as the name implies, comparison are used to compare one or more variables, numbers, constants, or a combination of the three.
Operator | Description | Test |
= | equal to | returns TRUE if values are equal |
<> | not equal to | returns TRUE if values are not equal |
> | greater than | returns TRUE if first value is greater than the second |
< | less than | returns TRUE if first value is less than the second |
>= | greater than or equal to | returns TRUE if first value is greater than or equal to the second |
<= | less than or equal to | returns TRUE if first value is less than or equal to the second |
Logical Operators – Like any other programming language, logical operators holds equal importance in VBScript as well.
Description | Symbol |
Logical negation | NOT |
Logical conjunction | AND |
Logical disjunction | OR |
Logical exclusion | Xor |
Logical equivalence | Eqv |
Logical implication | Imp |
Integer Division | \ |
Remainder Division | MOD |
Here is a Great Website You will probably find Exciting that we Motivate You.