Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . The Guide To CA-Clippe - <b>go</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 GO
 Move the record pointer to a specific record
------------------------------------------------------------------------------
 Syntax

     GO[TO] <nRecord> | BOTTOM | TOP

 Arguments

     <nRecord> specifies the target record number.

     BOTTOM specifies the last logical record in the current work area.

     TOP specifies the first logical record in the current work area.

 Description

     GO is a database command that positions the record pointer in the
     current work area to a specified record.  You can specify the record by
     number or as top or bottom of file.  If the new position is TOP and
     there is an active index, the record pointer moves to the first record
     in the index, otherwise it moves to record 1.  If the new position is
     BOTTOM and there is an active index, the record pointer moves to the
     last record in the index, otherwise it moves to LASTREC().

     The GO <nRecord> form of the command is the same as the RECORD clause of
     any database command that supports a scope.

 Notes

     .  Accessing filtered records: You can access records filtered by
        SET DELETED ON or SET FILTER TO with GO <nRecord>.  If DELETED is ON
        or there is an active FILTER, GO BOTTOM moves to the last logical
        record that is not deleted and/or that matches the filter condition.
        If DELETED is ON or there is an active FILTER, GO TOP moves to the
        first logical record that is not deleted and/or that matches the
        filter condition.

     .  Unique indexes: You can access records not present in an index
        created with SET UNIQUE ON or INDEX...UNIQUE with GO <nRecord>.

     .  Record out of range: In CA-Clipper, a GO that positions the
        pointer to a record out of range of the database file does not
        generate a runtime error.  Instead, EOF() and BOF() are set to true
        (.T.) and the record pointer is set to LASTREC() + 1.

     .  Refreshing database and index buffers: In a network
        environment, you can refresh database and index buffers without
        moving the record pointer by using GO RECNO().  Refer to the Network
        Programming chapter in the Programming and Utilities guide for more
        information.

 Examples

     .  These examples show simple GO results:

        USE Sales NEW
        ? LASTREC()            // Result: 84
        //
        GO TOP
        ? RECNO()              // Result: 1
        //
        GO BOTTOM
        ? RECNO()              // Result: 84
        //
        GO 5
        ? RECNO()              // Result: 5
        //
        GO 5 + 15
        ? RECNO()              // Result: 20

 Files:  Library is CLIPPER.LIB.

See Also: LASTREC() RECNO() SET FILTER SET RELATION SKIP

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