$FUNCNAME$
  EVAL()
$CATEGORY$
  CODEBLOCK
$SUMMARY$
   Evaluate a code block
$LANG_RU$
     .
$SYNTAX$
     EVAL(<bBlock>, [<BlockArg list>]) --> LastBlockValue
$LANG_RU$
     EVAL(< >,[< >]) -->   
$ARGUMENTS$
     <bBlock> is the code block to be evaluated.
     <BlockArg list> is a list of arguments to send to the code block
     before it is evaluated.
$LANG_RU$
     < >    .
     < >   ,   
         .
$RETURNS$
     EVAL() returns the value of the last expression within the block.  A
     code block can return a value of any type.
$LANG_RU$
     EVAL()      .  
         .
$DESCRIPTION$

     EVAL() is a code block function.  It is the most basic code block
     evaluation facility in the xClipper system.  A code block is a special
     data value that refers to a piece of compiled program code.  For more
     information on code blocks, refer to the "Basic Concepts" chapter in the
     Programming and Utilities Guide.

     To execute or evaluate a code block, call EVAL() with the block value
     and any parameters.  The parameters are supplied to the block when it is
     executed.  Code blocks may be a series of expressions separated by
     commas.  When a code block is evaluated, the returned value is the value
     of the last expression in the block.

     The xClipper compiler usually compiles a code block at compile time.
     There are, however, occasions at runtime when you may need to compile a
     code block from a character string.  You can do this by using the macro
     operator (&amp;).

     EVAL() is often used to create iteration functions.  These are functions
     that apply a block to each member of a data structure.  AEVAL(),
     ASORT(), ASCAN(), and DBEVAL() are iteration functions (e.g., AEVAL()
     applies a block to each element within an array).


$LANG_RU$

     EVAL()     .   
        xClipper    .  
        ,    
       .   
           " ".

            EVAL(),  
         .     
     .      
     ,  .    ,
           
     .

           xClipper-.
       ,      
           .
     (,    (&amp;)).

     EVAL()      - . 
      ,       
     . AEVAL(), ASORT(), ASCAN()  DBEVAL()   -
     .  AEVAL(), ,     
      .


$EXAMPLES$

       This example creates a code block that increments a number,
	and then evaluates it:

	bBlock := { |nArg| nArg + 1 }
	? EVAL(bBlock, 1)                     // Result: 2

       This example demonstrates compiling a code block at runtime
	using the macro operator (&amp;):

	// Compile a string to a block
	bBlock := &amp;("{ |nArg| nArg + 1 }")

	// Evaluate the block
	? EVAL(bBlock, 1)                     // Result: 2


$LANG_RU$

           :

       bBlock := { |nArg| nArg + 1 }
       ? EVAL(bBlock, 1)                     // : 2

         ,    
               (&amp;):

       bBlock := &amp;("{ |nArg| nArg + 1 }")    //   
       ? EVAL(bBlock, 1)                     //  


$SEEALSO$
  AEVAL(),ASCAN(),ASORT(),DBEVAL()
$END$
