$FUNCNAME$
  MEMVARBLOCK()
$CATEGORY$
  CODEBLOCK
$SUMMARY$
   Return a set-get code block for a given memory variable
$LANG_RU$
         .
$SYNTAX$
     MEMVARBLOCK(<cMemvarName>) --> bMemvarBlock
$LANG_RU$
     MEMVARBLOCK(<  >)  -->  
$ARGUMENTS$
     <cMemvarName> is the name of the variable referred to by the set-get
     block, specified as a character string.
$LANG_RU$
     <  > -  ,     
     ,    .
$RETURNS$
     MEMVARBLOCK() returns a code block that when evaluated sets (assigns) or
     gets (retrieves) the value of the given memory variable.  If
     <cMemvarName> does not exist, MEMVARBLOCK() returns NIL.
$LANG_RU$
     MEMVARBLOCK()   ,   
       ,     
      .   <  >  , 
     MEMVARBLOCK()  NIL.
$DESCRIPTION$
     The code block created by MEMVARBLOCK() has two operations depending on
     whether an argument is passed to the code block when it is evaluated.
     If evaluated with an argument, it assigns the value of the argument to
     <cMemvarName>.  If evaluated without an argument, the code block
     retrieves the value of <cMemvarName>.
$LANG_RU$
      ,   MEMVARBLOCK(),   ,
       ,        
     .      ,   
       <  >.   
     ,      < 
     >.
$EXAMPLES$
       This example compares MEMVARBLOCK() to a code block created
	using the macro operator (&amp;).  Note that using MEMVARBLOCK() allows
	you to avoid the speed and size overhead of the macro operator:

	PRIVATE var := "This is a string"
	//
	// Set-Get block defined using macro operator
	bSetGet := &amp;( "{ |setVal|;
	      IF( setVal == NIL, var, var := setVal ) }" )
	// Set-Get block defined using MEMVARBLOCK()

	// bSetGet created here is the functional
	// equivalent of bSetGet above
	bSetGet := MEMVARBLOCK("var")
$LANG_RU$
          MEMVARBLOCK()  
            . , 
        MEMVARBLOCK()      
          :

       PRIVATE var := " "
       //     
       bSetGet := &amp;("{|setVal| IF(setVal == NIL, var, var := setVal) }")

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