3
Data Types and Variables
In Visual Basic (VB), variable declaration defines a variable’s name, data type, and initial value (if any) before it is used in the program. Variables are used to store values assigned to them.
In this chapter, we’re going to cover the following main topics:
- Choosing data types
- Understanding variable scope
- How you should name variables
- Storing more than one value
- Differences in data types between family members
Choosing data types
Programming languages typically support several data types that can be used to represent different kinds of values. Here are some common data types in programming languages:
- Integer: This data type represents whole numbers, both positive and negative
- Float or Double: This data type represents ...
Get Visual Basic Quickstart Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.