GOTO

From Recital Documentation Wiki
Revision as of 16:51, 11 November 2009 by Helengeorge (Talk | contribs)

Jump to: navigation, search

Purpose

Position to a specific record in a table


Syntax

GO[TO] [RECORD] <expN> | BOTTOM | TOP [IN <alias>]


See Also

BOF(), EOF(), FIND, FOUND(), GOTO(), KEYMATCH(), LOOKUP(), LASTREC(), LOCATE, RECCOUNT(), RECNO(), RLOOKUP(), SEEK, SEEK(), SET CLIPPER, SET DELETED, SET PCFILTER, SET RELATION, SKIP


Description

The GOTO command is used to position the record pointer to the specified record in a table. The pointer is moved to the record whose number matches that specified in <expN>. By default, the GOTO command operates in the currently selected workarea. If the number specified in <expN> is not a valid record number, a 'Record is out of range' error message will be given.

BOTTOM

If the BOTTOM keyword is specified, then the record pointer is positioned to the last record in the table.

TOP

If the TOP keyword is specified, then the record pointer is positioned to the first record in the table.

IN <alias>

The IN <alias> clause is used to move the record pointer of an open table in another workarea.

If the command SET PCFILTER is ON, then the use of GOTO <expN> bypasses any FILTER <condition> that may be in effect with the SET FILTER TO command. The record pointer may be positioned to records that are marked for deletion, even if SET DELETED is ON. If SET CLIPPER is set ON, and GOTO RECORD <expN> is greater than the number of records in the table, the Recital/4GL does not report an error. Rather than reporting an error, the Recital/4GL sets EOF() to .T., and FOUND() to .F.. If SET RELATION TO is in effect for the active table, then defined relationships are maintained after the record pointer is positioned.


Example

goto top
browse
goto 10


Products

Recital Server, Recital