PUBLIC ARRAY Code Examples and SyntaxID: Q121418 2.5x 2.60 2.60a | 2.00 2.5x 2.6 2.60a | 2.5x kbenv kbprg kbcode kbdocerr
The information in this article applies to:
SUMMARYAlthough there is no code or syntax example for the ARRAY clause of the PUBLIC command in the FoxPro 2.5 or 2.6 "Language Reference" manual or in the FoxPro 2.0 "Command & Functions" manual, there is a sample program that demonstrates the effect of PUBLIC versus PRIVATE arrays in the "Developer's Guide."
MORE INFORMATIONPlease note that, as mentioned in the documentation, the PUBLIC command has no effect from the command line since all variables declared from the command line are PUBLIC by default; therefore, these code samples must be placed in a program file.
Example 1The following example, which is printed in Chapter 9 of the FoxPro "Developer's Guide" under the topic of "Public and Private Arrays," creates and initializes a public array named MYARRAY:
Example 2The following code illustrates the syntax and results of the PUBLIC ARRAY command, which in this example both declares and initializes as a false (.F.) logical each element of a two-dimensional array named "ATESTARAY" having four elements:
The resulting display in the currently active window will look as follows:
REFERENCESFoxPro for MS-DOS "Commands & Functions," version 2.0, see "PUBLIC" FoxPro for MS-DOS or Windows "Language Reference," version 2.5 or 2.6, page L3-765 FoxPro for Macintosh "Language Reference," version 2.5b or 2.5c, page 613 FoxPro "Developer's Guide", Chapter 9, "Public and Private Arrays" (c) Microsoft Corporation 1997, All Rights Reserved. Contributions by Perry Newton, Microsoft Corporation Additional reference words: FoxMac FoxDos FoxWin 2.00 2.50 2.60 docerr KBCategory: kbenv kbprg kbcode kbdocerr KBSubcategory: FxenvMemory |
|
Last Reviewed: August 11, 1997 © 1999 Microsoft Corporation. All rights reserved. Terms of Use. |