Site hosted by Angelfire.com: Build your free website today!

TUTORIAL 1 OVERVIEW

Lesson 1

Lesson 2
Quiz 2

Lesson 3
Quiz 3

Lesson 4
Quiz 4

Lesson 5
Quiz 5

CHECKPOINT 1

EXTRA INFO

Getting Started with VB6

GUI

Removing the form

Getting to the Next Lesson

Code Used

Variables and Data Types

Operators

 

 Mathematical and Text Operators  

Operators

Operator
Definition  Example  Result 
Exponent (power of)  4 ^ 2  16 
Multiply  5 * 4  20 
Divide  20 / 4 
Add  3 + 4 
Subtract  7 - 3 
Mod 
Remainder of division  20 Mod 6 
Integer division  20 \ 6 
String concatenation  "Joan" & " " & "Smith"  "Joan Smith" 


Note that the order of operators is determined by the usual rules in programming. When a statement includes multiple operations the order of operations is:
Parentheses ( ), ^, *, /, \, Mod, +, -

Logical operators

Operator 
Definition  Example  Result 
Equal to  9 = 11  False 
Greater than  11 > 9  True 
Less than  11 < 9  False 
>= 
Greater or equal  15 >= 15  True 
<= 
Less or equal  9 <= 15  True 
<> 
Not equal  9 <> 9  False 
AND 
Logical AND  (9 = 9) AND (7 = 6)  False 
NOT
Logical NOT NOT(9=9) False
OR 
Logical OR  (9 = 9) OR (7 = 6)  True