FoxPro functions for tables

Some of the more useful functions which provide information about FoxPro tables. Most apply to the current work area but many accept extra optional parameters to refer to another table. Look in the Visual FoxPro Help system for more information about command syntax.

AFIELDS(<name>) create an array <name> holding details of the fields. Note that the size of this array changed between VFP 7 and 8.
ALIAS() return the alias in use in the current work area.
AUSED(<name>) create an array <name> of the aliases in use and return the count.
CDX(1) return the full name and path of the current index file.
DBF() return the full name and path of the current table.
FCOUNT() return the number of fields in a table.
FIELD(<number>) return the name of field number <number>.
FSIZE(<name>) return the size of the field named <name>.
KEY(<number>) return the expression of index number <number>.
ORDER() return the name of the index tag in use.
RECCOUNT() return the number of records in the table. Note that RECCOUNT ignores the state of SET DELETED and SET FILTER.
RECNO() return the number of the current record.
TAGCOUNT() return the number of index tags in a table.
TAG(<number>) return the name of index number <number> in a table.
USED(<name>) return .T. if <name> is in use.