What is memory variable? Explain types of memory variable with example.
Hi Pooja Patel, sorry for this very late reply. I will answer your question based on my understanding and experience using foxpro.
The memory variable is where you can save your value (to a variable) and only resides on your memory different from a database or a textfile where you can also save value and permanently save to your disk. When you turned off the computer (or close your FoxPro application) or issue a command "CLEAR MEMORY", the value that you save in the variable will be lost (or will be empty/cleaned up). An exception is if you declare the value in the variable in your program and re-run the said program.
There are common ways to declare a variable:
1. PRIVATE - variables are declared and can be manipulated within a program (also with its sub-programs).
varz = 79
2. PUBLIC - variables which can be used and manipulated by any programs or sub-programs for the whole session (or program run).
varz = 79
Hope this helps you.