Functions and Directives

Function OrdDestroy() Foundation

Deletes one or more indexes

OrdDestroy( [<cTagName>|<nIndex>] ) --> NIL
<cTagName> is a optional character string containing the name of the index (tag) to delete from the index file (bag).
<nIndex> is a positive integer specifying the ordinal position within a work area. Indexes in a work area are numbered in the order they were opened.

The return value of OrdDestroy() is always NIL.


The index function OrdDestroy() deletes the index (tag) <cTagName> from an index file (bag) containing one or more indexes. In case the index file has just one index, the function also destroys the index file.

The function operates on the indexes of the current work area. If no <cTagName> or <nIndex> is passed, all indexes of the current work area are destroyed.

In case of compound indexes, trying to delete the first index yields a runtime error. Since the removal of the first index always leads to the destruction of the index file, all other indexes must first be destroyed before destroying the first index.


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.