Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - The quantity that does not change during the running of vb is called
The quantity that does not change during the running of vb is called

Amount that does not change during the course of the program is called a constant (Constant), such as 60, 90, etc.

Declaration of symbolic constants:

Const constant name [As constant type]=expression

For example: Const pi As Single=3.14159 The constant name is pi< /p>

Variable: During the execution of the program, the amount whose value can be changed is called a variable.

(1) Important points to note when naming variables:

① It must start with a letter and cannot start with other numbers or other characters.

② It can only consist of letters, numbers or underscores, and cannot contain decimal points, spaces and other characters.

③The maximum length should not exceed 255 characters.

④VB reserved words cannot be used as variable names, such as statement definers, function names, etc.

⑤VB does not distinguish between uppercase and lowercase letters in variable names. For example, Silly and Silly are the same variable.

(2) Declaration of variables:

DimAs

For example: Dim s As Integer defines an integer variable, The variable name is s