1. boolean type, which only occupies two bytes: true and false (true or false.
2. The Byte byte occupies one byte, which ranges from 0 to 255.
3. An integer occupies two bytes, usually expressed as %. For example, a %. It occupies two bytes (4 bytes in C) and the value range is 0----32768/32767.
4. The long integer occupies 4 bytes. Its abbreviated symbol is &, and its range is-2147483648 to 2147483647.
For integer and long integer types, we usually choose a long integer type. Although the long integer type is relatively large, it is faster than the integer type because the CPU is generally 32-bit, long integer data can be stored in registers or CPUs at a time, and the compatibility of long integer data is better.
5. Single single precision Floating Point 4 bytes. The range is large, but the accuracy is very small. In scientific computing, you don't need to change the accuracy. Its symbol is!
6. Double double.
7. String string a. variable-length string, used to read files, text searches, and so on.
B. Fixed Length characters
8. The date format is #............ #, For example, may be expressed as # November 11 #
9. Currency @
10. User Defined
11. variant variable type in VB, variables can not be declared, different from the above type, after assigning a value, you can assign another type of value to him, for example, the original is a string, later, he was assigned a date. Variant format:
Type Variable (such as integer) |
Corresponding data and address |
The disadvantage of variant is that the memory usage is large and the speed is slow. The convenience is flexible usage.
The data types in VB are not isolated. They can be converted to each other using conversion functions.