Declaring Variables
Declaring variables is a way of telling the computer:
- That you want a location in memory (the variable)
- What you will call (how you will refer to) that location in memory throughout your program (the variable name)
- What type of information you will store in that location in memory, so the computer will know how much space to set aside (the variable type)
-
VB6: Some examples of declaring variables:
- Dim num1 As Integer
- Dim letter1 As String
- Dim averageOverClass As Double