Difference between revisions of "SKIP"

From Recital Documentation Wiki
Jump to: navigation, search
 
(Products)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=SKIP=
 
 
 
==Class==
 
Fields and Records
 
 
 
 
==Purpose==
 
==Purpose==
 
Move the record pointer forwards and backwards in the active table
 
Move the record pointer forwards and backwards in the active table
Line 15: Line 8:
  
 
==See Also==
 
==See Also==
CONTINUE, FIND, GOTO, LOCATE, REPLACE, SEEK, SET CLIPPER. BOF(), EOF(), FOUND(), RECNO()
+
[[BOF()]], [[CONTINUE]], [[EOF()]], [[FIND]], [[FOUND()]], [[GOTO]], [[LOCATE]], [[RECNO()]], [[REPLACE]], [[SEEK]], [[SET CLIPPER]]
  
  
Line 34: Line 27:
 
m_event = event
 
m_event = event
 
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
endif
+
    endif
skip
+
    skip
 
enddo
 
enddo
 
// Another example
 
// Another example
Line 47: Line 40:
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital Server, Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 +
[[Category:Table Basics]]
 +
[[Category:Table Basics Commands]]
 +
[[Category:Data Commands]]

Latest revision as of 10:02, 30 November 2009

Purpose

Move the record pointer forwards and backwards in the active table


Syntax

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


See Also

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


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 Server, Recital