1. The quantity and number specified.
2. A certain repetition rule.
3. A certain number or usual number.
4. A certain order.
5. Mathematical terminology. A fixed value. For example, the ratio of circumference to diameter (π) of a circle is about 3. 14 16, and the expansion coefficient of iron is 0.0000 12.
Constant is a name with a certain meaning, which is used to replace numbers or strings, and its value never changes.
VBScript defines many intrinsic constants.
For more information, please refer to the VBScript language reference.
Create constant
You can use the Const statement to create user-defined constants in VBScript. Const statement can be used to create string constants or numeric constants with specific meanings and give them original values. For example:
Const MyString = "This is a string."
Constant age = 49
Note that the string literal is enclosed in two quotation marks (""). This is the most obvious way to distinguish between string constants and numerical constants. Date text and time text are enclosed by two pound signs (#). For example:
Constant expiration date = #6- 1-97#
It is best to use a naming scheme to distinguish between constants and variables. This can avoid redistributing constants when running the script. For example, you can use "vb" or "con" as the prefix of the constant name, or capitalize all the letters of the constant name. When developing complex scripts, distinguishing between constants and variables can avoid confusion.