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_taginfo() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 AX_TagInfo()
 Return information about all tags in compound index (.cdx)
------------------------------------------------------------------------------

 Syntax

     AX_TagInfo( [<nFileOrder>] ) -> array

     <nFileOrder> An optional numeric value specifying the index file
     order number of the desired index to use.  The index order number is
     based on the order in which the indexes are opened.

 Returns

     Returns a multi-dimensional array containing information about each
     tag in the .cdx file.  If the specified order is invalid or no index
     is open, it returns an empty array.

 Description

     This function returns an array of six element arrays, each containing
     information about a tag within the current or specified .cdx file.
     If <nOrder> is not specified, the current index is used.

     The following information is returned for each tag:

          [1] = Tag name
          [2] = Index key expression
          [3] = FOR clause expression (or "" if no FOR clause)
          [4] = Logical value - .T. if index is UNIQUE
          [5] = Logical value - .T. if index is DESCENDING order
          [6] = Logical value - .T. if index is CUSTOM order

     This function can also be used with .idx and .ntx files.  It returns a
     single element array containing an array with the above information.
     The index name is given in place of the tag name.

 Example

     // This program displays information for all the tags in a compound
     // index (.cdx).
     LOCAL nTagCnt, aInfo, nCnt

     // Open table and structural CDX
     USE test INDEX test VIA "DBFCDXAX"

     // Get number of tags for current .CDX
     nTagCnt := AX_TagCount()

     // Get the tag info for all tags in .CDX
     aInfo := AX_TagInfo()

     // Loop through tags and display info for each one
     FOR nCnt := 1 TO nTagCnt

        ?,? "Tag name: ",            aInfo[nCnt][1]
        ? "Key expression: ",        aInfo[nCnt][2]
        ? "FOR clause expression: ", aInfo[nCnt][3]
        ? "Unique tag: ",            aInfo[nCnt][4]
        ? "Descending tag: ",        aInfo[nCnt][5]

     NEXT


See Also: AX_TagCount() AX_TagName() AX_TagNo() AX_Tags()

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