Variables

Variables are used to store data that we want to use in our program. A variable has a name that is used to refer to that piece of data and it also has a type that determines the sort of data that it can store. We create variables using the Dim statement.

Dim Age As Integer
Dim Name As String

This declares two variables:
- one called Name which is used to store text
- one called Age which can store a whole number.

There are many different variable types in Visual Basic.
These are the main ones that we will be using:

String
used to hold some text
Char
a single character
Integer
a whole number
Double
a number that could have a fractional part
Boolean
a value that is either True or False

Coding conventions

The naming of things

Can this be

on multiple lines?