Note | This command is defined in a header file and will be preprocessed by the X# preprocessor to a function call. If you disable the standard header (-nostddefs) files then this command will not be available. If you tell the compiler to use a different standard header file (-stddef ) then this command may also be not available |
Move the record pointer relative to the current record.
SKIP [<nRecords>] [[IN|ALIAS] <workarea>]
<nRecords> | The number of logical records to move, relative to the current record. A positive value means to skip forward, and a negative value means to skip backward. If <nRecords> is omitted, a value of 1 is assumed. |
IN|ALIAS <workarea> | Specifies the work area for which the operation must be performed |
SKIP is functionally equivalent to DBSkip(). Specifying the alias is like using DBSkip() in an aliased expression (such as, <xcAlias>->DBSkip(<nRecords>).
This example uses SKIP with various arguments and shows the result:
USE customer NEW
SKIP
? RECNO() // Result: 2
SKIP 10
? RECNO() // Result: 12
SKIP -5
? RECNO() // Result: 7
This example moves the record pointer in a remote work area:
USE customer NEW
USE invoices NEW
SKIP ALIAS customer
This example prints a report using SKIP to move the record pointer sequentially through the CUSTOMER database file:
LOCAL nLine := 99
USE customer NEW
SET PRINTER ON
DO WHILE !EOF()
IF nLine > 55
EJECT
nLine := 1
ENDIF
Customer, Address, City, State, Zip
++nLine
SKIP
ENDDO
SET PRINTER OFF
CLOSE customer
XSharp.RT.DLL
BoF(), COMMIT, DbSetFilter(), DbSkip(), EoF(), GO, LOCATE, RecNo(), SEEK, SetDeleted()