Topic complex |
Table functions |
Function |
putmarks() |
Short |
Sets the marking list of a table |
Syntax |
PUTMARKS(DB : INTEGER; Marks) : INTEGER |
Parameter |
DB : table handle from OPENDB
Marks : TMARKS or REAL[] or TBITS[] |
Return |
Cardinality of the marking list (number of the marked records) |
See also: |
|
Description |
At first a eventual existing marking list of DB is deleted. Then the markings are set according to Marks.
If Marks is of the type TMarks, the marks that are saved at GETMARKS are rewritten,
if Marks is of the type REAL[], the values of Marks[] are marked according to the record numbers:
VAR i, x : INTEGER
WHILE x:=Marks[x] DO
SetMark(DB,x);
i++
END
Attention: The first field index is here 0.
Is Marks of the type TBITS[], x is marked if Marks[x] has the value 1:
VAR i : INTEGER
WHILE i++<=FileSize(DB) DO
IF Marks[i] THEN SetMark(DB,i) END
END
|