Introduction
This chapter continues to teach you about VB operators.
In this chapter we will discuss about the conditional
and logical operators that perform data comparision.
Moreover, you will learn some control statements so
that you can write programs that repeat sections of
code as many times as needed.
Conditional Operators
The conditional operator lets you compare one Visual
Basic data value to another. By using the conditional
operators, you can check if a value is less than,
equal to, or greater that another. Visual Basic supports
Six conditional operators which are listed in the
following table.
Operator |
Description |
Example |
Result |
= |
Equal to |
7=2 |
False |
> |
Greater than |
6 > 4 |
True |
< |
Less than |
8 < 5 |
False |
>= |
Greater than
equal to |
20 > = 20 |
True |
<= |
Less than equal
to |
15 <= 20 |
True |
<> |
Not Equal to |
5 <> 5 |
False |
|
The Equal sign is overloaded operator.
|
|