Visual Basic 6.0 variable lengths
VB variable type | Variable length in byte |
---|---|
Boolean | 2 |
Integer | 2 |
Long | 4 |
Single | 4 |
Double | 8 |
String | Number of characters * 2 |
Byte | 1 |
Array sizes
The length of an array is calculated from the number of individual array elements multiplied by the length of the variable type.
Example
If an array of 5 Long elements is to be read, the length is 20 bytes (5 elements * 4 bytes).
For a string with 25 characters, the length is 50 bytes (25 characters * 2 bytes).