Wednesday, February 25, 2009

Data types and modules

Data Types
Visual Basic supports different types of data types according to the needs of program or application
You can say that attribute of a variable that determines what kind of data it can hold is known as Datatype.
By Default Visual Basic supports the variant data type.Declaring a variable variant indicates that it can support all types of data types.Mainly Visual Basic supports the following datatypes:
Table of Data Types
Data Types Storage (in bytes) Prefix Example
Byte 8 Byt bytVar
Boolean 1 Bln blnNum
Integer 2 int intCount
Long; 4 lng lngNumbers
Single 4 sng sngAverage
Double 8 dbl dblMarks
Date 8 dte dteNext
Object 4 obj ObjMywork Avgs
String According to the length of string str strNames
Variant 16 vnt vntTotal

No comments: