Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - aindorder() return the order number of the active index http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 aindorder()         Return the order number of the active index
------------------------------------------------------------------------------
 Declaration
   database.hdr

 Syntax
   func uint aindorder extern
   param alias sDatabase

 Arguments
   sDatabase is the alias to retrieve information about.

 Return
   The order number of the controlling index.

 Description
   The aindorder() function returns the order number of the active
   controlling index in the specified work area.

   Use the aindorder() function to save the current index order within a
   routine which needs to change the order. At the end of the routine the
   original index order can be restored. This allows for generic routines
   without unwanted side effects.

 Example
   #define EXAMPLE_DATABASE
   #include example.hdr

   proc Test_aindorder
   vardef
      uint uOldOrder
   enddef
   open sTest index sIdxLN, sIdxB
   uOldOrder := aindorder( sTest )       // save index order
   ? aindorder( sTest )                  // prints 1
   ! sTest set order to 2
   ? aindorder( sTest )                  // prints 2
   ! sTest set order to uOldOrder        // restore the previous index order
   ? aindorder( sTest )                  // prints 1
   endproc

   proc main
   Test_aindorder()
   endproc

See Also: index indorder() open set order to

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