VB Lecture Notes - Variables & Data Types
Objective #1: Name variables using the appropriate data type prefixes and the proper capitalization.
Objective #2: Understand each of the basic data types used by Visual Basic.
data type |
characteristics |
range |
size (bytes) |
Boolean | True or False | True or False | 2 |
Integer | positive and negative whole numbers but not decimal numbers | -2,147,483,648 to 2,147,483,647 | 4 |
Double | integers or decimal numbers | -1.79769313486231E308 to -4.94065645841247E-324 for negative values; 4.94065645841247E-324 to 1.79769313486232E308 for positive values | 8 |
String | text, symbols, digits, usually more than a single character | 0 to about 2 billion Unicode characters | varies depending on the length of the string |
Objective #3: Use Dim statements to declare variables and understand the physical process of memory (RAM) allocation.
Objective #4: Determine the scope of a variable.
Objective #5: Use constants.