Function DbEval() Foundation
Evaluates a code block for each record in a work area.
DbEval( <bBlock>, ; [<bForCondition>], ; [<bWhileCondition>], ; [<nCount>], ; [<xRecordID>], ; [<lRest>] ) --> NIL
The return value of DbEval() is always NIL.
The database function DbEval() evaluates a code block and increments the record pointer of a work area after each execution of the code block. When the function is used without the alias operator, it moves the record pointer in the current work area. By default, DbEval() begins with the first logical record and evaluates the code block <bBlock> for each record until the last logical record is reached. The number of records for which the code block is evaluated can be influenced by the optional arguments.
By specifying code blocks for <bForCondition> or <bWhileCondition>, a logical condition can be defined which must return the value .T. (true) for the code block <bBlock> to be evaluated. The <bForCondition> code block is evaluated for all data records. When it returns .T. (true), <bBlock> is executed. When <bWhileCondition> is specified, <bBlock> is only executed until <bWhileCondition> returns .F. (false), causing DbEval() to terminate.
Alternatively the number of records can be explicitly determined with <nCount> or <lRest>. Specifying <xRecordID>positions the record pointer on this record and the code block <bBlock> is evaluated for this and following records.
DbEval() passes no arguments to the code blocks.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.