FoxPro/foxpro

Advertisement


Question
What is memory variable? Explain types of memory variable with example.

Answer
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).
Example:

varz = 79


2. PUBLIC - variables which can be used and manipulated by any programs or sub-programs for the whole session (or program run).
Example:

PUBLIC varz
varz = 79

Hope this helps you.

Zaldy

FoxPro

All Answers


Answers by Expert:


Ask Experts

Volunteer


Rozaldy A. Gutierrez

Expertise

I can answer questions about application programming and database topics.

Experience

I am using this programming language,from Foxpro 2.6 to Visual FoxPro 7, for more than three years.

Organizations
Phildevfox

Education/Credentials
Finished the degree of Bachelor of Science in Information Technology from Polytechnic University of the Philippines.

©2016 About.com. All rights reserved.