Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SIx Driver RDD v3.00 - Reference Guide - <b>sx_step:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Sx_Step:

  Syntax:   Sx_Step()

  Returns:  The STEP value used in an INDEX ON...OPTION command as a numeric.
            If no STEP (or EVERY) clause was used, zero (0) is returned.

  Description:  This function is only useful within a UDF that is called
                from the OPTION (or EVAL) clause of the INDEX ON command.
                It is used to determine the STEP (or EVERY) clause value
                that was passed to the INDEX ON command.

                This function is used in the ODOMETER() function contained
                in SIXTOOLS.PRG.

  Example:

    #include "SIXNSX.CH"

    CLS
    USE test VIA "SIXNSX"
    INDEX ON last TO last OPTION MyFunc() STEP 10

    //------------------------------------------//
    FUNC MyFunc()

      STATIC nCount := 0, nTotal := 0, nStepVal := 0

      IF Bof()
        nCount := 0
        nTotal := LastRec()
        nStepVal := Sx_Step()
      ENDIF

      @ 0,0 SAY "Records Processed: " +;
                  AllTrim( Str( nCount )) + "/" + AllTrim( Str( nTotal ))

      nCount += iif( nCount < nTotal, nStepVal, 0 )

    Return( .T. )



See Also: INDEX ON

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