The syntax defined for the NEXT function is as follows:
IntegerValue := Record.NEXT ( ReadStepSize )
The full assignment statement format is rarely used to set an IntegerValue. In addition, there is no documentation for the usage of a non-zero IntegerValue. When IntegerValue goes to zero, it means a NEXT record was not found.
If the ReadStepSize value is negative, the table will be read in reverse; if ReadStepSize is positive (the default), then the table will be read forward. The size of the value in ReadStepSize controls which records should be read. For example, if ReadStepSize is 2 or -2, then every second record will be read. If ReadStepSize is 10 or -10, then every tenth record will be read. The default value is 1, in which case, every record will be read and the read direction will be forward.
In a typical data-read loop, the first read is a FIND or FINDSET function, followed by a REPEAT-UNTIL loop. The exit condition is the UNTILRecord...