INF: PUBLIC ARRAY Code Example and Syntax
PSS ID Number: Q119237
Article last modified on 08-30-1994

2.5x 2.60 | 2.00 2.5x 2.60 | 2.50b 2.50c

WINDOWS   | MS-DOS         | MACINTOSH


---------------------------------------------------------------------------
The information in this article applies to:

 - Microsoft FoxPro for Windows, versions 2.5x, 2.6
 - Microsoft FoxPro for MS-DOS, versions 2.0, 2.5x, 2.6
 - Microsoft FoxPro for Macintosh, versions 2.5b, 2.5c
--------------------------------------------------------------------

SUMMARY
=======

There is no code or syntax example for the ARRAY clause on the PUBLIC
command in the FoxPro documentation. The example below illustrates its
syntax and usage.

MORE INFORMATION
================

The code below shows how to use the PUBLIC ARRAY command, which will both
declare and initialize as a false (.F.) logical each element of a two-
dimensional array named "ATESTARAY" having four elements.

Please note, as mentioned in the documentation, that the PUBLIC command has
no effect from the command line since all variables declared from the
command line are PUBLIC by default; therefore, this code must be placed in
a program.

   PUBLIC ARRAY atestaray(2,2)
   DISPLAY MEMORY LIKE atestaray
   WAIT WINDOW

The resulting display on the currently active window will be as follows:

   ATESTARAY   Pub    A
     (   1,   1)     L  .F.
     (   1,   2)     L  .F.
     (   2,   1)     L  .F.
     (   2,   2)     L  .F.

REFERENCES
==========

"Commands & Functions," FoxPro for MS-DOS, version 2.0, see "PUBLIC"

"Language Reference," FoxPro for MS-DOS or FoxPro for Windows, version 2.5
or 2.6, page L3-765

"Language Reference," FoxPro for Macintosh, version 2.5b or 2.5c, page 613

Additional reference words: 2.00 2.50 2.50a 2.50b 2.50c 2.60 docerr

=============================================================================

Copyright Microsoft Corporation 1994.
