0
Thanks

A few words of thanks would be greatly appreciated.

# VBScript - The Operators

Operators are symbols used to manipulate variables, that is to say, perform operations, evaluate, compare ...
• operators to perform calculation
• comparison operators
• logical operators

These operators can mathematically change the value of a variable:

Operator Name Effect Example Result (x = 7)
-Subtraction operatorSubtraction two valuesx-34
-Negation operatorUsed with a single operand, it reverses the sign of the variable-x-7
*Multiplication operatorMultiplies two valuesx*321
/Division operatorDivides two valuesx/32.3333333
=Assignment operatoassigns a value to a variablex=3Assign the value 3 to the variable x
^power operatorraise the variable to the specified power xx^249
Mod modulo operator Returns the remainder of division of the left operand to the right of x x Mod 21

Operator Name Effect Example Result
= equality operatorCompares two values ??and check their equalityx=3Returns true if X is equal to 3 or false in the other case.
<Relational operator (is smaller than)Checks if a variable is less than a valuex<3Returns true if X is less to 3 or false in the other case.
<=Relational operator (is smaller than or equal)Checks if a variable is less than or equal to a valuex<=3Returns true if X is less or equal to 3 or false in the other case.
>Relational operator (is greater than)Checks if a variable is greater than a valuex>3Returns true if X is greater to 3 or false in the other case.
>=Relational operator (is greater than or equal)Checks if a variable is greater than or equal to a valuex>=3Returns true if X is greater or equal to 3 or false in the other case.
<>Relational operator (is not)Checks if variable is different from a valuex<>3Returns true if X is different from 3.
IsComparaison operator Compares two expressionsexpression1 Is expression2Returns true if the result of the left operand is the same as the one to the right

This type of operator allows you to check if one or more conditions are true:

Opérateur Dénomination Effet Syntaxe
OrOr Check whether one of the conditions is achieved((condition1)Or(condition2))
AndANDVerifies that all conditions are met((condition1)And(condition2))
XorInverse orMake the inverse of the OR ((condition1)Xor(condition2))
EqvEquivalencePerforms an equivalence between two conditions ((condition1)Eqv(condition2))
ImpImplicationChecks a logical implication between two conditions((condition1)Imp(condition2))

The following operators are used to perform operations on strings:

Operator Name Effect Syntax Result
&ConcatenateConcatenate two strings"Hello"&"World""HelloWorld"
LikeCompararaisonCompares two strings"hello" like "goodbye"False

Original document published CommentcaMarche.net.
0
Thanks

A few words of thanks would be greatly appreciated.

CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.

## Related

This document, titled « VBScript - The Operators », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).

Recommended

DON'T MISS

TRENDING GAMES & APPS
• Religion

• Video games

• Video games

• Video games

• Video games

• Apps

• Professional

• Health

• Health

• Video Calls

### Zoom

• Social Networking