Difference between revisions of "SKIP"
Helengeorge (Talk | contribs) |
Barrymavin (Talk | contribs) (→Products) |
||
Line 45: | Line 45: | ||
[[Category:Table Basics]] | [[Category:Table Basics]] | ||
[[Category:Table Basics Commands]] | [[Category:Table Basics Commands]] | ||
+ | [[Category:Data Commands]] |
Latest revision as of 10:02, 30 November 2009
Contents
Purpose
Move the record pointer forwards and backwards in the active table
Syntax
SKIP [<expN>] [IN | ALIAS <workarea | alias>]
See Also
BOF(), CONTINUE, EOF(), FIND, FOUND(), GOTO, LOCATE, RECNO(), REPLACE, SEEK, SET CLIPPER
Description
The SKIP command moves the record pointer forwards or backwards in the currently selected table. The numeric expression <expN> can be positive or negative. If the SKIP command is issued with no numeric expression <expN> specified then the record pointer advances on to the next record. If the currently selected table is indexed, then the SKIP command follows the order of the master index. The SET ORDER TO command can be used to select which of the open index files should be the master or controlling index.
If the record pointer is currently positioned on the last record of the table and the SKIP command is issued, the EOF() function will return .T.. If the record pointer is currently positioned on the first record of the table, and the SKIP -1 command is issued, the BOF() function will return .T..
If SET CLIPPER is ON, the SKIP 0 command will flush locked records to disk if they have been modified. If no records are locked, SKIP 0 is ignored. SKIP 0 will not work this way in interactive mode. SKIP will ignore empty tables, and no error will occur. SKIP 0 is most effective from within forms using REPLACE commands in a validation procedure. The SKIP command is primarily used in conjunction with the DO...WHILE command.
IN | ALIAS <workarea | alias>
The optional IN <workarea | alias> or ALIAS <workarea | alias> clause allows you to move the record pointer in a workarea other than the current workarea. The record pointer in the current workarea is not moved as a result of this option.
Example
use patrons index events, dates, names m_event = event do while .not. eof() display off date, event, name if m_event <> event ? m_event = event endif skip enddo // Another example skip 9 in orders
Products
Recital Server, Recital