Make your own free website on Tripod.com
Conditional Statements Tutorial

Lesson 1
Tutorials - Page 1 - Page 2 - Page 3 - Page 4 - Page 5 - Page 6 - Page 7 - Page 8 - Page 9 - Page 10

Examples Of Boolean Expressions
The following code:

Dim ABC As Boolean
ABC = (3 > 4)
Print ABC


Will print "False" on the form.
The value of the boolean expression 3 > 4
is "False", because 3 is not greater than 4.


The following code:

Dim ABC As Boolean
ABC = ("abf" = "abf")
Print ABC


Will print "True" on the form.
The value of the boolean expression "abf" = "abf"
is "True", because "abf" is equal to "abf"


The following code:

Dim ABC As Boolean
Dim A As Integer
Dim B As Integer
A = 1
B = 2
ABC = (A + 1 = B)
Print ABC


Will print "True" on the form,
because the value of the boolean expression (A + 1 = B) is "True".


In Boolean expressions you can use the following signs:

= Equal to
<> Not Equal to
> Greater than
< Smaller than
>= Greater than or Equal to
<= Smaller than or Equal to

Back  Forward