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>m6_addscoped():</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  m6_AddScoped():

  Purpose:  Scan a selected index and add records to a filter based on
            high and low key values.

   Syntax:  m6_AddScoped( <nHandle>, [<xLowVal>], [<xHighVal>], [<nOrder>] )

    Where:  <nHandle>     --  Is a handle to a previously allocated
                              filter.

            <xLowVal>     --  The beginning key value in a range (inclusive).
                              The key at which the index scan should begin.  A
                              NIL value indicates the scan should start at the
                              top of the index.

            <xHighVal>    --  The ending key value in the range (inclusive).
                              Beyond this value the index scan will terminate.
                              A NIL value indicates the scan should continue
                              until the end of the index file.

            <nOrder>      --  Order list position for the index file to
                              scan.  If no parameter is specified then
                              the current index is scanned.

  Returns:  The number of indexed records in the filter.

     Note:  *Always free RYO filters that are no longer being used.*

  Example:

         #include "SIXCDX.CH"
         #include "MACHSIX.CH"

         //................................................use customer file
         USE Customer via "SIXCDX"

         //...................................open indexes used for querying
         SET INDEX TO State, Age

         //...............................................create RYO filter1
         nHandle1 := m6_NewFilter()

         //...............................................create RYO filter2
         nHandle2 := m6_NewFilter()

         //............................Add records to filter1 for State ='CA'
         m6_AddScoped( nHandle1, "CA", "CA" )

         //.............................Add records to filter2 for Age >= 25
         m6_AddScoped( nHandle2, 25, NIL, 2 )

         //.........................join the filters,  Filter1 .AND. Filter2
         m6_FiltJoin( nHandle1, nHandle2, JOIN_INTERSECT )

         //..SET FILTER TO my RYO filter ( Note: System now owns the filter )
         m6_SetAreaFilter( nHandle1 )

         //...............................................Browse the results
         Browse()


See Also: m6_NewFilter() m6_FiltJoin() m6_SetAreaFilter()

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