SKIP Command
Moves the record pointer forward or backward in a table.
SKIP [nRecords] [IN nWorkArea | cTableAlias]
Parameters
nRecords
Specifies the number of records to move the record pointer.Issuing SKIP without nRecords advances the record pointer to the next record. The record pointer moves toward the end of the file nRecords records if nRecords evaluates to a positive number. The record pointer moves toward the beginning of the file nRecords records if nRecords evaluates to a negative number.
If the record pointer is positioned on the last record of a table and SKIP with no arguments is executed, RECNO( ) returns a value 1 greater than the number of records in the table and EOF( ) returns true (.T.). If the record pointer is positioned on the first record of a table and SKIP –1 is executed, RECNO( ) returns 1 and BOF( ) returns true (.T.).
IN nWorkArea | cTableAlias
Moves the record pointer in a table in a specific work area. nWorkArea specifies the work area number and cTableAlias specifies a table or work area alias.
Remarks
If the table has a master controlling index tag or index file, SKIP moves the record pointer to the record determined by the index sequence.
Example
CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'data\testdata')
USE customer && Opens Customer table
CLEAR
SKIP 4 IN 'customer'
? RECNO('customer') && Displays 5
GO BOTTOM
SKIP -5
? RECNO( )