Returns the FOR clause of a specified index tag.

Syntax

FOR([<.mdx filename expC>,] [<index position expN> [,<alias>]])

<.mdx filename expC>

The .MDX file that contains the index tag you want to check. The .MDX must be opened in the specified work area. If omitted, all open indexes, including the production .MDX file, are searched.

<index position expN>

the numeric position of the index tag in the specified .MDX file, or the position of the index in the list of open indexes.

<alias>

The work area you want to check.

Note

Unlike most functions, the first parameter is optional. If you omit the first parameter, the remaining parameters shift forward one; the second parameter becomes the first parameter, and so on.

Description

FOR( ) returns a string containing the FOR expression of the specified .MDX tag. FOR( ) returns an empty string ("") if the specified index tag does not have a FOR expression.

The index must be referenced by number. If you do not specify an .MDX file to check, index numbering in the list of open indexes is complicated if you have open .NDX indexes or you have open non-production .MDX files. For more information on index numbering, see SET INDEX. Either way, it is often easier to reference an index tag by name by using the TAGNO( ) function to get the corresponding position number.

If you do not specify an index tag, FOR( ) checks the current master index tag and returns an empty string if the master index is an .NDX file or there is no master index.

If the specified .MDX file or index tag does not exist, FOR( ) returns an empty string.

OODML

No equivalent.