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 - aofskip() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 aofSkip()
 Skips forward/backward in a user-owned Client Advantage Optimized Filter
------------------------------------------------------------------------------

Syntax

     aofSkip( <nHandle> [, <nSkipCount>] ) -> numeric

     <nHandle>  Handle to an existing user-owned filter.

     <nSkipCount>  Optional number of records to skip. One is the
     default. A negative value indicates a backwards skip.

Returns

     Returns the numeric record number of the record skipped to in the
     filter. A return value of  0 (zero) indicates an error or that there
     were no more records in the filter. If aofSkip() returned zero,
     aofErrorCode() will return information on why the function returned
     zero.

Description

     aofSkip() re-positions a user-owned filter to nSkipCount records
     from the current record position.

     If this function is passed a handle for a user-owned filter, then
     the system's record number (returned by the recno() function) will
     not change. The record number returned by aofGetRecord() will be
     affected, however.

     Note:  Filters are always stored in record number order. Therefore
     when you skip forward you should expect the filter record numbers to
     increase, and likewise decrease when you skip backwards.

Example

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

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

     // Go to the first record in the filter
     ? aofGoBottom( nHandle )       // 5

     // Skip through the records in the filter
     ? aofSkip()                    // 10
     ? aofSkip( 2 )                 // 20
     ? aofSkip()                    // 0

     // Free the memory for this user-owned filter
     aofFreeFilter( nHandle )


See Also: aofGoTop() aofGoBottom() aofGoRecord() aofGetRecord()

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