Comparison Operators

Addition Operator (+),And Operator,Assignment Operator (=),Concatenation Operator (&),Division Operator (/),Eqv Operator,Exponentiation Operator (^),Imp Operator,Integer Division Operator (\),Is Operator,Mod Operator,Multiplication Operator (*),Negation Operator (-),Not Operator,Operator Precedence,Or Operator,Subtraction Operator (-),Xor Operator Home home | Other Resources other resources | Advertise with us advertise | Link to us link to us | Contact us contact | Bookmark Us!
Google
 
Where can I find good Windows Web Hosting to host my VBScript Site?
You can find good Windows Hosting which support VBScript, ASP, ASP.Net,VisualStudio.Net and MSSQL at a very reasonable low monthly fee at EasyCGI.com and DiscountASP.Net

Comparison Operators

Used to compare expressions.

result = expression1 comparisonoperator expression2

result = object1 Is object2

Parts

result

Any numeric variable.

expression

Any expression.

comparisonoperator

Any comparison operator.

object

Any object name.

Remarks

The Is operator has specific comparison functionality that differs from the operators in the following table. The following table contains a list of the comparison operators and the conditions that determine whether result is True, False, or Null:

OperatorDescriptionTrue ifFalse ifNull if
<Less thanexpression1 < expression2expression1 >= expression2expression1 or expression2 = Null
<=Less than or equal toexpression1 <= expression2expression1 > expression2expression1 or expression2 = Null
>Greater thanexpression1 > expression2expression1 <= expression2expression1 or expression2 = Null
>=Greater than or equal toexpression1 >= expression2expression1 < expression2expression1 or expression2 = Null
=Equal toexpression1 = expression2expression1 <> expression2expression1 or expression2 = Null
<>Not equal toexpression1 <> expression2expression1 = expression2expression1 or expression2 = Null

When comparing two expressions, you may not be able to easily determine whether the expressions are being compared as numbers or as strings.

The following table shows how expressions are compared or what results from the comparison, depending on the underlying subtype:

IfThen
Both expressions are numericPerform a numeric comparison.
Both expressions are stringsPerform a string comparison.
One expression is numeric and the other is a stringThe numeric expression is less than the string expression.
One expression is Empty and the other is numericPerform a numeric comparison, using 0 as the Empty expression.
One expression is Empty and the other is a stringPerform a string comparison, using a zero-length string (") as the Empty expression.
Both expressions are EmptyThe expressions are equal.

VBScriptOnline.com - Addition Operator (+),And Operator,Assignment Operator (=),Concatenation Operator (&),Division Operator (/),Eqv Operator,Exponentiation Operator (^),Imp Operator,Integer Division Operator (\),Is Operator,Mod Operator,Multiplication Operator (*),Negation Operator (-),Not Operator,Operator Precedence,Or Operator,Subtraction Operator (-),Xor Operator