$FUNCNAME$
  FIELDWBLOCK()
$CATEGORY$
  DATABASE,CODEBLOCK
$SUMMARY$
   Return a set-get code block for a field in a given work area
$LANG_RU$
           .
$SYNTAX$
     FIELDWBLOCK(<cFieldName>, <nWorkArea>) --> bFieldWBlock
$LANG_RU$
     FIELDWBLOCK(< >,<  >)  -->  
$ARGUMENTS$
     <cFieldName> is the name of the field specified as a character
     string.
     <nWorkArea> is the work area number where the field resides
     specified as a numeric value.
$LANG_RU$
     < > -    ,    .
     <  > -   ,   ,
        .
$RETURNS$
     FIELDWBLOCK() returns a code block that, when evaluated, sets (assigns)
     or gets (retrieves) the value of <cFieldName> in the work area
     designated by <nWorkArea>.  If <cFieldName> does not exist in the
     specified work area, FIELDWBLOCK() returns an empty block.
$LANG_RU$
     FIELDWBLOCK()   ,   
       ,    
       .
$DESCRIPTION$
     FIELDWBLOCK() is a database function that builds a code block.  When
     evaluated with the EVAL() function, the code block first selects the
     designated <nWorkArea>.  If an argument was passed, the code block then
     assigns the value of the argument to <cFieldName>.  If no argument was
     passed, the code block retrieves the value of <cFieldName>.  The
     original work area is then reselected before the code block returns
     control.

     Note that the specified field variable may not exist when the code block
     is created but must exist before the code block is executed.
$LANG_RU$
     FIELDWBLOCK() -   ,   , 
        EVAL(),   
      - <  >.     
       EVAL(),     < >
      .    ,  
        < >.

      < >      , 
             
      EVAL()    .
$EXAMPLES$
       This example compares FIELDWBLOCK() to a code block created
	using the macro operator.  Note that using FIELDWBLOCK() avoids the
	speed and size overhead of the macro operator:

	// Set-Get block for work area 1 defined with
	// macro operator
	bSetGet := &amp;( "{ |setVal| IF( setVal == NIL, ;
	   1->FName, 1->FName := setVal ) }" )
	// Set-Get block defined using FIELDWBLOCK()

	// bSetGet created here is the functional
	// equivalent of bSetGet above
	bSetGet := FIELDWBLOCK("FName", 1)
$LANG_RU$
          FIELDWBLOCK()  
            . , 
        FIELDWBLOCK()     
           :

       //      1   
       //  
       bSetGet := &amp;( "{ |setVal| IF(setVal == NIL, ;
	  1->FName, 1->FName := setVal ) }" )

       //      FIELDWBLOCK()
       //        
       bSetGet := FIELDWBLOCK("FName", 1)
$SEEALSO$
  FIELDBLOCK(),MEMVARBLOCK()
$END$
