PRIVATE Memory Variables and Memory AllocationLast reviewed: April 30, 1996Article ID: Q112820 |
The information in this article applies to:
In FoxPro, variables are allocated out of a general pool of FoxPro memory that is defined statically at startup. You can set the size of this pool in FoxPro for Windows by using the MEMLIMIT setting in the CONFIG.FP(W) file. The number of variables and their values will not change the size of the general memory pool defined at startup. NOTE: In Visual FoxPro, memory is dynamically allocated, and the MEMLIMIT statement is not used. Despite the common phraseology, "declaring a variable private," the PRIVATE command does not declare anything. It simply hides any higher-level variables of the same name as lower-level variables. The only way to declare or define a PRIVATE variable is to assign it a value. FoxPro does not generate native code. It is an interpreter and uses the "stack" itself. According to the glossary in the Microsoft C++ version 7.0 "Environment and Tools" manual, the stack is "a dynamically expanding and shrinking area of memory in which data items are stored in consecutive order and removed on a last-in, first-out basis. The stack is most commonly used to store information for function and procedure calls and for local variables." Therefore, variables defined in a FoxPro application cannot be stored "on the stack" and are not static.
REFERENCESMSDN CD 6, Microsoft C++ "Environment and Tools," version 7.0, Glossary (S)
|
Additional reference words: VFoxWin 3.00 FoxDos FoxWin 2.50 2.50a 2.50b
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |