Compartilhar via


SYS(14) - Index Expression

Returns index expression of an open single-entry .idx index file or index expressions for tags in compound .cdx index files.

SYS(14, nIndexNumber [, nWorkArea | cTableAlias])

Return Values

Character

Parameters

  • nIndexNumber
    Specifies which index expression to return from the open index files or tags. SYS(14) returns index expressions from open index files and tags in the following order as nIndexNumber increases from 1 to the total number of open single-entry files and structural compound and independent compound index tags:

    1. Index expressions from single-entry index files (if any are open) are returned first. The order the single-entry index files are included in USE or SET INDEX determines the order the index expressions are returned.
    2. Index expressions for each tag in the structural compound index (if one is present) are returned next. The index expressions are returned from the tags in the order that the tags were created in the structural index.
    3. Index expressions for each tag in any open independent compound indexes are returned last. The index expressions are returned from the tags in the order that the tags were created in the independent compound indexes.

    The empty string is returned if nIndexNumber is greater than the total number of open single-entry files and structural compound and independent compound index tags.

  • nWorkArea | cTableAlias
    Specifies a work area number or work area alias. If you omit nWorkArea and cTableAlias, index expressions are returned from index files open in the current work area. If a table doesn't have the alias you specify, Visual FoxPro generates an error message.

Remarks

An index expression is specified when an index file or tag is created with INDEX. The index expression determines how a table is displayed and accessed when an index file or tag is used to order the table.

For more information on index expressions and creating index files and tags, see INDEX. SYS(14) is similar to the KEY( ) function.

USE and SET INDEX both support an index file name list that makes it possible for you to open index files for a table. Any combination of single-entry index files, structural compound or independent compound index file names can be included in the index file list.

See Also

CDX( ) | KEY( ) | INDEX | MDX( ) | NDX( ) | REINDEX | SET INDEX | SET ORDER | SYS( ) Functions Overview | TAG( )