Lesson#7 Variables and Data Types Flashcards
What is a variable?
A named storage location in your computer’s memory.
What two fields can you specify when declaring a variable?
Variable Name and Type of Data
After creating a variable how can you refer to it?
By using the specified variable name.
What are the 2 ways you can declare a variable?
Explicitly and Implicitly
What is the difference between Explicitly and Implicitly declared variables?
Explicitly declared variables are assigned a variable name prior to first use, Implicitly are not.
What is meant by the term data type?
Refers to how a piece of data is stored.
What happens if you do not declare the data type of a variable?
It is automatically given a Variant data type.
What is the basic structure of a variable declaration?
A keyword(Dim, Private, Public or Static), variable name and the ‘As’ keyword followed by the data type.
What are the 6 main data types you can work with?
Variant, String, Numeric, Date, Boolean and Object
What does the Variant data type allow you to store?
Almost any kind of data apart from fixed-length strings.
What does the String data type allow you to store?
Text
What does the Numeric data type allow you to store?
Numbers
What does the Date data type allow you to store?
Dates and Times
What does the Boolean data type allow you to store?
True and False
What does the Object data type allow you to store?
Object references and result in object variables.