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 v5.5 - aofaddrange() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 aofAddRange()
 Adds records in a specified range to a Client Advantage Optimized Filter
------------------------------------------------------------------------------

Syntax

     aofAddRange(<nHandle>,[<xLowVal>],[<xHighVal>],[<nOrder>])
                                                      -> numeric

     <nHandle>  Handle to an existing filter.

     <xLowVal>  The beginning key value in a range (inclusive) at
     which the index scan should begin. If this value is not specified,
     the scan will start at the top of the index.  The data type of this
     value must match that of the key expression in the current or
     specified index order.

     <xHighVal>  The ending key value in the range (inclusive) at
     which the index scan will terminate. If this is not specified, the
     scan will continue to the end of the index. The data type of this
     value must match that of the key expression in the current or
     specified index order.

     <nOrder>  The order number of the index file to scan. If no
     parameter is specified, the current index order is used.

Returns

     The number of records in the filter.

Description

     Adds the records to a user-owned or a system-owned filter that falls
     within the specified range in the current or specified index order.
     To add records to a system-owned filter using aofAddRange(), you must
     first get a handle to that system-owned filter via the
     aofGetFilterHandle() function.

     Note:  aofAddRange() will not obey an existing index scope on the
     current or specified index order if <xLowVal> and/or <xHighVal> are
     specified.

Example

     USE Customer VIA "DBFCDXAX"

     SET INDEX TO State, Age

     // Create first empty, user-owned Optimized Filter
     nHandle1 := aofCreateFilter()

     // Create second empty, user-owned Optimized Filter
     nHandle2 := aofCreateFilter()

     // Add records to first filter for states in California
     aofAddRange( nHandle1, "CA", "CA" )

     // Add records to second filter for ages greater than or equal to 25
     aofAddRange( nHandle2, 25,, 2 )

     // Free the user-owned filters
     aofFreeFilter( nHandle1 )
     aofFreeFilter( nHandle2 )


See Also: aofGetFilterHandle()

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