Table Field Naming Conventions

See Also

Follow this suggested format for naming fields in tables. These conventions are recommended, not required.

Syntax

Alias.TypeName

Arguments

Type

Notes the data type for a field in a table. Suggested prefixes for Type are as follows.

Type Description Example
c Character
Customer.cLastName
d Date
Customer.dBirthDay
t Datetime
Customer.tLastMod
b Double
Customer.bRate
f Float
Customer.fValue
g General
Customer.gPicture
l Logical
Customer.lSellMail
m Memo
Customer.mComments
y Currency
Customer.yYearTDate
n Numeric
Customer.nItems
I Integer
Customer.iCustID

Remarks

Prefixes aren't required, but are recommended as good programming practice. Using a prefix does not dictate the contents of a field — in Visual FoxPro, prefixes are used only as a naming convention. For example, adding the prefix "d" does not check that the contents of a field is a date, but it does help you remember the data type contained in the field.

For more information, see Visual FoxPro Naming Rules.