Module 4

Managing VB2010 Data 
 Getting to know various data types in Visual Basic 2010 
 Assigning values to the variables 
 Getting to know various arithmetic operators in Visual Basic 2010 
In our daily life we come across many types of data. For example, we need to handle data 
such as names, addresses, money, dates, stock quotes, statistics and more everyday. 
Similarly, in Visual Basic 2010, we have to deal with all sorts of data; some are numeric in 
natrure while some are in the form of text or other forms. VB2010 divides data into different 
types so that it is easier to manage when we need to write the code involving those data. 
4.1 Visual Basic 2010 Data Types
Visual Basic classifies the information mentioned above into two major data types; namely 
the numeric data types and the non-numeric data types. 
4.1.1 Numeric Data Types 
Numeric data types are types of data that consist of numbers, which you can compute 
them mathematically with various standard operators such as add, minus, multiply, divide 
and so on. Examples of numeric data types are your examination marks, your height and 
your weight, the number of students in a class, share values, price of goods, monthly bills, 
fees and more. In Visual Basic 2010, we divide numeric data into seven types, depending 
on the range of values they can store. Calculations that only involve round figures or data 
that do not need precision can use Integer or Long integer in the computation. Programs 
that require high precision calculation need to use Single and Double decision data types, 
we also call them floating-point numbers. For currency calculation, you can use the .
Summary 
 In section 4.1, you learned that we could categorize data types into numeric and 
non-numeric data types. 
 In section 4.2, you learned about the rules to name variables in Visual Basic 
2010. Besides, you also learned how to declare variables using the Dim keyword 
and assign values to them. 
 In section 4.3, you learned about constants and the way to declare them.

Comments

Popular posts from this blog

Module 3

Module 5