Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Why is% 100 in vb not an integer constant?
Why is% 100 in vb not an integer constant?
% 100 is not the writing of VB integer constant.

Declare integer constants and use const statements.

Const statement, declaring constants used to replace literal quantity.

Constants are private by default.

Const MyVar = 459

Declare a private integer constant.

Private Const MyInt As Integer = 5

The type declaration character of an integer is a percent sign (%).

Integer variables are stored in the form of 16 bits (2 bytes) ranging from -32768 to 32767. The type declaration character of an integer is a percent sign (%).

The following two lines declare an integer data type variable named intSj.

Dim intSj is an integer.

Dim intSj%

The following is to declare an integer constant a with a value of 100.

Constant a% = 100