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 - aofisrecordinfilter() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 aofIsRecordInFilter()
 Determines if a record is in the Client Advantage Optimized Filter
------------------------------------------------------------------------------

Syntax

     aofIsRecordInFilter( <nHandle>, <nRecord> ) -> logical

     <nHandle>  Handle to an existing filter.

     <nRecord>  Record number to check if in the filter.

Returns

     Returns a logical .T. if the record is set in the filter (if the
     filter is partially optimizable, .T. means a potential match), .F.
     indicates that record is NOT in the filter.

     Note:  If the filter is partially optimizable (test if partially
     optimized with aofHasPartials() function) then a true value from this
     function indicates that the record is a candidate to be in the filter.
     A candidate record is one that the indexed portion of the filter
     determined could be in the filter. However, until the partially
     optimizable portion has been tested, one cannot be certain that the
     record is actually in the filter. See the aofResolvePartial()
     function to resolve the uncertainty of a partially optimizable
     filter.

Description

     aofIsRecordInFilter() returns whether the specified record is
     contained in the specified filter.

Example

     // Create an empty user-owned filter
     nHandle := aofCreateFilter

     // Add records 5 and 10 to the filter
     ? aofAddRecord( nHandle,  5 )          // .T.
     ? aofAddRecord( nHandle, 10 )          // .T.

     // Test if records are in the filter
     ? aofIsRecordInFilter( nHandle,  5 )   // .T.
     ? aofIsRecordInFilter( nHandle, 20 )   // .F.

     // Free memory allocated to filter
     ? aofFreeFilter( nHandle )             // .T.


See Also: aofResolvePartial() aofHasPartials()

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