Legal Information
PC Knowledge Base - Conditional Operators in Visual Basic

Good Knowledge Is Good2Use

To control the VB program flow, we can use various conditional operators. Basically, they resemble mathematical operators. Conditional operators are very powerful tools, they let the VB program compare data values and then decide what action to take, whether to execute a program or terminate the program and etc.
These operators are shown below

Operator Meaning
= Equal to
> More than
< Less Than
>= More than and equal
<= Less than and equal
<> Not Equal to
Conditional Operators

* You can also compare strings with the above operators. However, there are certain rules to follows: Upper case letters are less than lowercase letters,

So the following test would be true and the branch taken to LessThan
Name1 = "ARt"
Name2 = "Art"
IF Name1 < Name2 then goto LessThen
similarly
Name1 = "1ART"
Name2 = "ART"
IF Name1 < Name2 then goto LessThan



Search Knowledge Base Feedback
If you like our web site refer a friend.
Your friends name.
Your friends email address.
Your Name
Your Email Address


© Copyright 1998-1999 GOOD2USE