Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . Technical Reference - <b>dbeval()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 dbEval()
 Evaluate code block for each row (record) in workarea
------------------------------------------------------------------------------
 Prototype

     HIDE ERRCODE dbEval(
                          WORKAREAP wa,
                          DBEVALINFOP dbEvalInfo
                        )

 Arguments

     wa is a pointer to self.

     dbEvalInfo is a pointer to a structure containing information
     necessary for a code block evaluation.

 Description

     Evaluates a code block for each row in scope in wa.

 Default Behavior

     dbEval() emulates the CA-Clipper DBEval() function, obeying the "normal"
     Xbase scoping conditions.  dbEval() calls evalBlock() for each row in
     the database, using the wa's skip() method to traverse the data.  Both
     wa and dbEvalInfo->bBlock are passed to each call of evalBlock() while
     the following conditions are met:

     .  If dbEvalInfo->scope.nRecord is set to a number, evalBlock()
        is called once with that physical record number.

     .  If dbEvalInfo->scope.nNext is set to a number n, then n
        iterations occur.

     .  Otherwise, evalBlock() is called for each record while wa->eof
        is not true and the dbEvalInfo->scope.bWhile block evaluates to TRUE.

 Implementation Notes

     .  If this method is reimplemented, care should be taken to
        completely emulate the behavior of Xbase scoping.  This will offer
        the CA-Clipper developer maximum compatibility with the Xbase DML.
        Note especially that several of the scoping conditions exclude each
        other, and many opportunities exist for optimization.  The default
        behavior of this method provides a very high level of optimization
        with the default Xbase scoping.

 Files:  Header file is Rdd.api.


See Also: DBEVALINFO WORKAREA skip()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson