PUBLIC Command
Defines global variables or arrays. There are two versions of the syntax.
PUBLIC MemVarList |
PUBLIC [ ARRAY ] ArrayName1( nRows1 [ , nColumns1 ] ) [, ArrayName2( nRows2 [, nColumns2 ] ) ] ... [AS type [OF ClassLib]] |
Parameters
- PUBLIC MemVarList
-
Specifies one or more memory variables to initialize and designate as global. Use commas to separate multiple items in MemVarList.
The single letters A through J and M are reserved and cannot be used as variable names.
- PUBLIC [ ARRAY ] ArrayName1( nRows1 [, nColumns1 ] ) [, ArrayName2( nRows2 [, nColumns2] )] ...
-
Specifies one or more arrays to initialize and designate as global. For more information about arrays, see DIMENSION Command.
- [ AS type [OF ClassLib] ]
-
Specifies the data type of the variable or array and the class library containing the type description of type on which this variable or array is based.
You can use the AS clause to implement strong typing. IntelliSense functionality is available for object and variable references only when they are strongly typed. For more information, see How to: Implement Strong Typing for Class, Object, and Variable Code.
Remarks
Example
See Also
© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic
Note
Microsoft Visual FoxPro 9 SP2 Help file, VFPX Edition v1.08