Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Why is the largest integer variable of VBA 32767?
Why is the largest integer variable of VBA 32767?
The integer value of VB ranges from -32768 to 32767, because integers take up 2 bytes, 16 bits, where most significant bit stands for sign bit, 0 stands for integer, and 1 stands for negative number. The largest positive number is: (01111111165438+.

If the data to be stored in the program is beyond the range of -32768 and 32767, you can use long integers. The space occupied by long integers is 4 bytes, and the range of values is-2147483648-2147483648, which is enough to represent.