[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  DBEVAL()          Documentation interpretation.                          ~

  Clipper Version  1.03 dtd 09/15/90.

  Problem Statement

  DBEVAL() documentation states that DBEVAL() returns NIL. This statement
  should not limit your imaginative use of this function, as illustrated
  below.

  Cause

  Not Applicable.

  Work Around(s)

  Not Applicable.

  Notes:

  * This example fills a multi-dimensional array with the contents of a    ~
  * .dbf file using DBEVAL and AEVAL.
  * It also demonstrates the dynamic attribute of STATIC arrays and
  * use of AEVAL's undocumented, second variable.

  STATIC aArray := {}
  LOCAL n, y
  CLS ; USE test NEW ; ASIZE(aArray,LASTREC())
  DBEVAL( {|| ;
    aArray[RECNO()] := {} , ASIZE(aArray[RECNO()], FCOUNT()), ;
    AEVAL(aArray[RECNO()],{|x,e| aArray[RECNO(),e] := FIELDGET(e)} ) } )
  USE
  QOUT() ; QOUT()
  AEVAL(aArray, { |x,e| AEVAL(aArray[e], { |x| QQOUT(x), QQOUT(" ") }), ;
                        QOUT() })

See Also: AEVAL()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson