Difference between revisions of "SKIP"

From Recital Documentation Wiki
Jump to: navigation, search
 
Line 15: Line 15:
  
 
==See Also==
 
==See Also==
CONTINUE, FIND, GOTO, LOCATE, REPLACE, SEEK, SET CLIPPER. BOF(), EOF(), FOUND(), RECNO()
+
[[CONTINUE]], [[FIND]], [[GOTO]], [[LOCATE]], [[REPLACE]], [[SEEK]], [[SET CLIPPER]], [[BOF()]], [[EOF()]], [[FOUND()]], [[RECNO()]]
  
  
Line 35: Line 35:
 
do while .not. eof()
 
do while .not. eof()
 
display off date, event, name
 
display off date, event, name
if m_event # event
+
if m_event <> event
 
?
 
?
 
m_event = event
 
m_event = event

Revision as of 12:15, 16 March 2009

SKIP

Class

Fields and Records


Purpose

Move the record pointer forwards and backwards in the active table


Syntax

SKIP [<expN>] [IN | ALIAS <workarea | alias>]


See Also

CONTINUE, FIND, GOTO, LOCATE, REPLACE, SEEK, SET CLIPPER, BOF(), EOF(), FOUND(), RECNO()


Description

The SKIP command moves the record pointer forwards or backwards in the currently selected table. The numeric expression <expN> can be positive or negative. If the SKIP command is issued with no numeric expression <expN> specified then the record pointer advances on to the next record. If the currently selected table is indexed, then the SKIP command follows the order of the master index. The SET ORDER TO command can be used to select which of the open index files should be the master or controlling index.

If the record pointer is currently positioned on the last record of the table and the SKIP command is issued, the EOF() function will return .T.. If the record pointer is currently positioned on the first record of the table, and the SKIP -1 command is issued, the BOF() function will return .T..

If SET CLIPPER is ON, the SKIP 0 command will flush locked records to disk if they have been modified. If no records are locked, SKIP 0 is ignored. SKIP 0 will not work this way in interactive mode. SKIP will ignore empty tables, and no error will occur. SKIP 0 is most effective from within forms using REPLACE commands in a validation procedure. The SKIP command is primarily used in conjunction with the DO...WHILE command.

IN | ALIAS <workarea | alias>

The optional IN <workarea | alias> or ALIAS <workarea | alias> clause allows you to move the record pointer in a workarea other than the current workarea. The record pointer in the current workarea is not moved as a result of this option.


Example

use patrons index events, dates, names
m_event = event
do while .not. eof()
display off date, event, name
if m_event <> event
?
m_event = event
endif
skip
enddo
// Another example
skip 9 in orders


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer