Topic complex |
Table functions |
Function |
prevrec() |
Short |
Physical number of the previous record |
Syntax |
PREVREC(Tabellenhandle : INTEGER) : INTEGER |
Parameter |
db: table handle returned by OPENDB |
Return |
Physical number of the previous record
0, if there is no previous record |
See also: |
|
Description |
The functions FIRSTREC, LASTREC, PREVREC and NEXTREC apply with the actual order which is setup with the function ACCESS.
The following orders (access sequences) are possible:
Number -> physical record number
Marking -> internal marking list
Index -> order is defined out of the index
A typical pass sequence looks like:
x:=LASTREC(table)
WHILE x DO
READREC(table,x)
... work with the record
x:=PREVREC(table)
END
Information: The functions of this group should only be used in combination with index accesses. To access via physical record numbers or markings there are faster methods:
Number: x:=0; WHILE x++<=FILESIZE(table) DO ... END
Marking: x:=FIRSTMARK(table); WHILE x DO ...; x:=NEXTMARK(table,x) END
|