Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>skip</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SKIP


Syntax:     SKIP [<expN1>] [ALIAS <alias>/(<expN2>)]

Purpose:    To move the record pointer to a new position relative to the
            current pointer position.

Argument:   <expN1> specifies the number of records to move the
            record pointer from the current position.  A positive value
            moves the record pointer forward and a negative value moves
            the record pointer backwards.  A zero argument flushes the
            current work area buffer to DOS buffers.  If <expN1> is
            omitted, the default is one.

Option:     Alias: The ALIAS clause specifies the alias name as a
            literal identifier or the work area as a <expN> where the
            record pointer is to be moved.

Usage:      SKIPping backward beyond the beginning-of-file moves the
            pointer to the first record and BOF() returns true (.T.).
            SKIPping forward beyond the end-of-file positions the record
            pointer at LASTREC() + 1 and EOF() returns true (.T.).

            If an index file is in USE, SKIP moves <expN1> positions in
            the index.

            Flushing Clipper buffers: Any command that repositions
            the record pointer flushes the current database record
            buffer if the current record has changed since it was read
            from disk.  SKIP 0 can be used to force a flush of the
            current record buffer without causing record movement.  Note
            that the timing of actual disk-writes depends on DOS unless
            you execute a COMMIT to force an actual disk-write.  SKIP 0
            itself does not necessarily cause a disk write.  Note also
            that the command does not flush INDEX buffers.

Library:    CLIPPER.LIB


----------------------------------- Examples -------------------------------

   USE Customers
   ? RECNO()                   && Result: 1

   SKIP
   ? RECNO()                   && Result: 2

   SKIP 10
   ? RECNO()                   && Result: 12

   SKIP -5
   ? RECNO()                   && Result: 7

   SKIP -10
   ? RECNO()                   && Result: 1


   The following example moves the record pointer in a remote work area:

   SKIP ALIAS 4

   This is the same as:

   last_area = SELECT()
   SELECT 4
   SKIP
   SELECT (last_area)


See Also: COMMIT BOF() EOF() RECNO()

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