SKIP Command

Example   See Also

Moves the record pointer forward or backward in a table.

Syntax

SKIP
  [nRecords]
  [IN nWorkArea | cTableAlias]

Arguments

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.