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_fileorder() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 AX_FileOrder()
 Returns currently active index file order
------------------------------------------------------------------------------

 Syntax

     AX_FileOrder() -> numeric

 Returns

     Returns a numeric value indicating the current index file order
     position.  The value returned is equal to the position of the active
     index in the list of open indexes for the current work area.  If there
     is no controlling index, a zero is returned and records are accessed
     in natural order.  If no table is open, AX_FileOrder() will
     also return a zero.

 Description

     This function is provided to duplicate the behavior of the IndexOrd()
     function in CA-Clipper releases prior to 5.2.

     It determines the position of the active index in the list of index
     files opened by the last USE....INDEX or SET INDEX TO in the current
     work area.

     Note:  CA-Clipper's IndexOrd() function operates differently between
     5.2/5.3 and earlier versions.  In the CA-Clipper 5.2 and 5.3 releases,
     the IndexOrd() function operates much like the AX_TagOrder() function,
     in that it counts each TAG within a .cdx file as an ORDER. ORDERs were
     previously dealt with on a FILE basis only.

 Example

     // Assume TEST.DBF has a TEST.CDX with three tags (AGE, LAST, and
     // STATE).  Also, assume CITY.IDX and TEMP.IDX exist as well.

     USE test VIA "DBFCDXAX"         // Open TEST.DBF and TEST.CDX
     SET INDEX TO city, temp, test   // Order indexes

     // Current TAGORDER is:
     // 1 - CITY
     // 2 - TEMP
     // 3 - AGE
     // 4 - LAST
     // 5 - STATE

     // Current Index (FILE) Order is:
     // 1 - CITY.IDX
     // 2 - TEMP.IDX
     // 3 - TEST.CDX

     AX_SetTagOrder( 4 )             // Select LAST tag in TEST.CDX
     ? AX_TagOrder()                 // Returns 4

     ? IndexOrd()                    // Returns 4

     ? AX_FileOrder()                // Returns 3


See Also: AX_SetTagOrder() AX_TagOrder() AX_ClearOrder()

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