Variable Naming Conventions
When naming variables, use the following recommended format.
[Scope]TypeVariableName |
Parameters
- [ Scope]
-
Specifies a character that indicates the range of reference for the variable.
The following table lists suggested values for Scope.
Scope Description l
Local
t
Parameter
g
Public (Global)
p
Private (Default)
Note In some cases, explicit scoping does not apply. For example, in the main program of a standalone application, there is no difference in visibility for variables scoped as PUBLIC or PRIVATE. In sample programs, the type prefix is always relevant and required.
- Type
-
Specifies a character that indicates the data type of the variable.
The following table lists suggested values for Type.
Type Description a
Array
c
Character, Varchar, Varchar (Binary)
y
Currency
d
Date
t
DateTime
b
Double
f
Float
l
Logical
n
Numeric
o
Object
q
Varbinary, Blob
u
Unknown
- VariableName
-
Specifies the name of the variable.
Example
See Also
© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic
Microsoft Visual FoxPro 9 SP2 Help file, VFPX Edition v1.08