The information in this article applies to:
SUMMARY
For consistency, readability, and making troubleshooting a little easier,
standard naming conventions should be used in programming. Some naming
conventions are required for sample code. This article gives the
recommended standard naming conventions for constants, variables, objects,
tables, and windows in Visual FoxPro. This information is available in Help
by typing the following in the Command Window:
MORE INFORMATIONConstant Naming ConventionsSyntax: NAMEExample: #DEFINE MAX_VALUE 10 Render constants in all uppercase letters. Variable Naming ConventionsSyntax: [Scope]TypeNameThe Scope prefix is recommended but not required. In some cases, explicit scoping does not apply. For example, in the main program of a stand-alone application, there is no difference in visibility for variables scoped as PUBLIC or PRIVATE. Scope specifies the range of reference for the variable. For example, local variables can be referenced only within the procedure that defines them. Public variables are accessible from anywhere in the application. The choices for Scope are:
The Type prefix is always relevant and is required in sample programs.
Type specifies the data type for the variable. The choices for Type are:
Object Naming ConventionsSyntax: PrefixNameFollow this suggested format for naming objects. The choices for Prefix are:
Table Field Naming ConventionsSyntax: Alias.TypeNameArguments: Type Follow this suggested format for naming fields in tables. These conventions are recommended, not required. Type specifies the data type for a field in a table. The choices for Type are:
Window Naming ConventionsSyntax: wNameExample:
Follow this suggested format for naming windows. Do not use a prefix on
class definitions. Use prefixes only when the object is instantiated.
Additional query words: VFoxWin
Keywords : kbVFp300 kbVFp600 FxprgGeneral |
Last Reviewed: August 10, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |