How to: Define a Constant
| Visual FoxPro 9.0 SP2 |
| How to: Define a Constant |
| See Also |
A constant can contain any data type value.
To assign a value to a constant
-
Use the #DEFINE preprocessor directive.
In the following example, the constant TABLERR1 is defined as a character string.
Copy Code | |
|---|---|
#DEFINE TABLERR1 "This table is not available. Please try later." | |
In an application, wherever you would normally specify the character string "This table is not available. Please try later." you can use TABLERR1 instead.
To release a defined constant
-
Use the #UNDEFINE preprocessor directive.
Copy Code#UNDEF TABLERR1
See Also
© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic
Microsoft Visual FoxPro 9 SP2 Help file, VFPX Edition v1.08