Example
This example shows how to use the NEXT function:
Count := 0;
IF Customer.FIND('-') THEN
REPEAT
Count := Count + 1;
UNTIL Customer.NEXT = 0;
This code uses a REPEAT UNTIL loop to count the number of entries in the Customer table. The FIND function finds the first entry in the table. Each time the system calls NEXT, it steps one record forward. When NEXT equals zero (0), there are no more entries in the table and the system exits the loop.
Comments
repeat
//code
until next(-1)=0;
Thanks
Record.SETRANGE(foo, 'bar');
WHILE Record.FIND('+') DO BEGIN
Record.foo := 'foo';
Record.MODIFY;
END;
If it was hard to write, it should be hard to understand."
That would be the only correct way to go...
If it was hard to write, it should be hard to understand."