Variables | data | Data type Variant variables are formatted with OLE definitions, can hold any type of data, and the format of the following diagram holds some variables in 16 bytes.
0-1
2-7
8-15
VarType
Unused
Value
The No. 0 and 1 bytes hold an integer value to indicate what type of data is stored in the 第8-15 byte, and the 2nd to 7th byte is generally not used, and in most cases the 8th to 15th byte of the variable is not fully used. For example, if you save an integer with a Variant variable, the value in the first two bytes is 2-vbinteger, and the 8th and 9 bytes hold the real 16-bit value.
Let's write a piece of code to verify that.
The Dim V As Variant is the default data type for VB, so it can also be defined as Dim V
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.