Macro Substitution
| Visual FoxPro 9.0 SP2 |
| Macro Substitution (Visual FoxPro) |
| See Also |
You can replace names with variables by using macro substitution. To use macro substitution, place an ampersand (&) before the variable to tell Visual FoxPro to use the value of the variable as a name, and use a period (.) to end the macro substitution expression.
For example, the following print statement produces "FoxPro":
Copy Code | |
|---|---|
x = "Fox" ? "&x.Pro" | |
A command or function containing a name expression runs faster than one containing macro substitution, so use a name expression instead of macro substitution whenever possible. For more information about macro substitution, see the & Command topic in Help.
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