Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Advantage CA-Clipper Guide v6.11 - ax_indextype() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 AX_IndexType()
 Type of the current or specified index
------------------------------------------------------------------------------

 Syntax

     AX_IndexType( [<nFileOrder>|<cIndexFile>] ) -> numeric

     <nFileOrder>  A numeric value specifying the file order position of
     the desired index.  The index file order position is based on the order
     in which the indexes are opened.

     <cIndexFile>  The index name with or without a file extension.

 Returns

     One of five numeric values is returned.  The valid return values are:

          0 = No index found
          1 = Non-compact IDX
          2 = Compact IDX
          3 = CDX
          4 = NTX

 Description

     AX_IndexType() returns a numeric value signifying the index file
     format of current or specified index.  To specify an index, use either
     the index order number or the index name.  If no parameter is
     specified, the active index is assumed.

 Example

     USE test VIA "DBFCDXAX"
     INDEX ON last TO last NONCOMPACT   // Creates LAST.IDX
     ? AX_IndexType()                   // 1 (non-compact .idx)

     INDEX ON age TO age                // Creates AGE.IDX
     ? AX_IndexType()                   // 2 (compact .idx)

     INDEX ON state TAG state           // Creates TEST.CDX
     ? AX_IndexType()                   // 3 (.cdx)

     SET INDEX TO test, last, age
     ? AX_IndexType( 3 )                // 2 (type of AGE.IDX)
     ? AX_IndexType( "LAST" )           // 1 (type of LAST.IDX)
     CLOSE                              // Close all files

     USE test VIA "DBFNTXAX"
     INDEX ON age TO age                // Creates AGE.NTX
     ? AX_IndexType( AX_IndexName() )   // 4 (type of AGE.NTX)


See Also: AX_IndexName() AX_TagInfo()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson