C5_GO

 GO
 Move the pointer to the specified identity
------------------------------------------------------------------------------
 Syntax

     GO[TO] <xIdentity> | BOTTOM | TOP

 Arguments

     <xIdentity> is a unique value guaranteed by the structure of the
     data file to reference a specific item in a data source (database).  In
     a .dbf, identity is the record number.  In other data formats, identity
     is the unique primary key value.

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

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

 Description

     GO[TO] is a database command that positions the record pointer in the
     current work area at the specified identity.  In an Xbase data
     structure, this identity is the record number because every record, even
     an empty record, has a record number.  In data structures of different
     design, identity may be defined as something other than record number.

 Examples

     .  This example saves the current record number, searches for a
        key, and then restores the record pointer to the saved position:

     FUNCTION KeyExists( xKeyExpr )

        LOCAL nSavRecord := RECNO()      // Save the current record
                                         // pointer position
        LOCAL lFound

        SEEK xKeyExpr
        IF ( lFound := FOUND() )
           .
           .  < statements >
           .
        ENDIF

        GOTO nSavRecord      // Restore the record pointer position

        RETURN ( lFound )

See Also: DBGOTO() LASTREC() RECNO() SET DELETED SET FILTER



Advertisements

4 responses to “C5_GO

  1. Pingback: C5DG-3 RDD Reference | Viva Clipper !

  2. Pingback: C5_SKIP | Viva Clipper !

  3. Pingback: DB Commands | Viva Clipper !

  4. Pingback: C5 Commands | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.