Syntax
DbEval( bBlock, [bForCondition], [bWhileCondition], [nNextRecords], [nRecord], [lRest] ) --> NILArguments
bBlock
Block evaluated for each selected record. Remaining arguments define the scope.
Return value
NIL.
Description
DbEval() walks records in the current work area and evaluates bBlock for each record accepted by the FOR, WHILE and range arguments.
Notes
The record pointer is restored after evaluation.
Example
PROCEDURE Main()
DbCreate( "eval_demo.dbf", { { "NAME", "C", 12, 0 } } )
DbUseArea( .T., , "eval_demo.dbf", "People" )
DbAppend()
FieldPut( 1, "Anna" )
DbAppend()
FieldPut( 1, "Jan" )
DbCommit()
QOut( "Names:" )
DbEval( {|| QOut( FIELD->NAME ) } )
DbCloseArea()
FErase( "eval_demo.dbf" )
RETURNOutput