$FUNCNAME$
  MEMORY()
$CATEGORY$
  SYSTEM,ENVIRONMENT
$SUMMARY$
   Determine the amount of available free pool memory
$LANG_RU$
        .
$SYNTAX$
     MEMORY(<nExp>) --> nKbytes
$LANG_RU$
     MEMORY(< >) --> - 
$ARGUMENTS$
     <nExp> is a numeric value that determines the type of value MEMORY()
     returns as follows:

     <PRE> MEMORY() Argument Values
     ------------------------------------------------------------------------
     Value     Meaning
     ------------------------------------------------------------------------
     0         Estimated total space available for character values
     1         Largest contiguous block available for character values
     2         Area available for RUN commands
     ------------------------------------------------------------------------
     </PRE>
$LANG_RU$
     < > -  , 
      ,   MEMORY(),  .

     <PRE>   MEMORY()
     ---------------------------------------------------------------------
      
     ---------------------------------------------------------------------
      0             
      1         ,    
      2       ,   ,   RUN
     ---------------------------------------------------------------------
     </PRE>
$RETURNS$
     MEMORY() returns an integer numeric value representing the amount of
     memory available, in one -kilobyte increments.
$LANG_RU$
     MEMORY()         
      1 .
$DESCRIPTION$
     MEMORY() is an environment function that reports various states of free
     pool memory.  (Free pool is the dynamic region of memory that stores
     character strings and executes RUN commands.)
$LANG_RU$
     MEMORY() -  ,     
       .     
       ,   RUN.
$EXAMPLES$
       This example uses MEMORY() before a RUN command to determine
	if there is enough memory available to execute the external program:

	#define MEM_CHAR   0
	#define MEM_BLOCK   1
	#define MEM_RUN      2
	//
	IF MEMORY(MEM_RUN) >= 128
	   RUN MYPROG
	ELSE
	   ? "Not enough memory to RUN"
	   BREAK
	ENDIF
$LANG_RU$
        ,  MEMORY()   
        RUN     
           :

       #define MEM_CHAR    0
       #define MEM_BLOCK   1
       #define MEM_RUN     2
       //
       IF MEMORY(MEM_RUN) >= 128
	  RUN MYPROG
       ELSE
	  ? "    RUN"
	  BREAK
       ENDIF
$SEEALSO$

$END$
