2. The Visual Basic Language
Defining Your Own Constants
- You can also define your own constants for use in Visual Basic.
The format for defining a constant named PI with a value
3.14159 is:
- User-defined constants should be written in all upper case
letters to distinguish them from variables. The scope of constants is
established the same way a variables� scope is. That is, if defined
within a procedure, they are local to the procedure. If defined in
the general declarations of a form, they are global to the form.
To make constants global to an application, use the format:
Global Const PI = 3.14159
within the general declarations area of a module.
Counter Hit
This Homepage is special brought to you by CK Tan