A variable is a memory location whose value can change throughout the operation of a program. A variable can contain any data type value. You can change the value of a variable at any time. This option enables you to monitor the status of anything that changes throughout the operation of an application.
The following examples are simple assignment statements that are functionally equivalent.
STORE 7 TO nVar nVar = 7
The following example uses a variable,
nInc, to hold the value of a loop counter. Visual FoxPro assigns a new value to the variable during each loop.
FOR nInc = 1 TO 10 ? nInc ENDFOR
The following example uses a variable, cName, to hold the value of the
Firstname field from the
USE Customer STORE Customer.Firstname TO cName