Data Storage Containers
You choose a data storage container according to the amount and type of data, and how you want to use it. You determine the availability of data by the way you declare it and where you create it in the program. This range of availability or effectiveness is called scope.
Most programming languages make it possible for you to store data in constants, variables, and arrays. In Visual FoxPro, you can also store data in records and objects. For more information about differences, see Visual FoxPro and Other Programming Languages.
Scope of Data Containers
The following table summarizes the scope differences between data containers.
Container | Scope | Example |
---|---|---|
Constants | Private |
|
Variables | Public, private, or local |
|
Arrays | Public, private, or local |
|
Fields | Permanent storage, accessible while the table containing the records is open |
|
Object Properties | Referenced through the object and the object's container hierarchy |
|
See Also
Access to Variables | Arrays | Constants | Fields | LOCAL Command | Objects | PRIVATE Command | PUBLIC Command | Records | Variables | Object Properties | Visual FoxPro and Other Programming Languages | Overview of the Language