DIAdem Help

Constants

  • Updated2024-09-12
  • 1 minute(s) read

Constants

A constant is a name for a number or for a character string that you use in a script instead of the actual value. You cannot change the value of a constant. VBS has many integrated constants.

Because the constants are integrated in VBS, you do not need to define the constants before use. You can use the constants anywhere in the script to display the values.

Creating Constants

Use the Const statement to specify your own constants for numeric values or character strings in VBS:

Const TEMPERATURE = 20
Const UNIT = "Degree C"

Use meaningful names when you define your constants. To differentiate variables and constants easily, use capital letters for the names of constants.

Related Topics

Class | Const | Function | Sub | Property Get | Property Let | Property Set | ByRef - ByVal