qb45advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
SETMEM Function Details
  QuickSCREEN      Details      Example      Contents      Index
──────────────────────────────────────────────────────────────────────────────
SETMEM Function Details
 
Syntax
  SETMEM(numeric-expression)
 
The numeric-expression indicates the number of bytes to increase or
decrease the far heap.
  ■ If the numeric-expression is negative, SETMEM decreases the far heap
    by the indicated number of bytes.
  ■ If the numeric-expression is positive, SETMEM attempts to increase
    the far heap space by the number of bytes.
 
SETMEM returns the total number of bytes in the far heap. If the
numeric-expression is zero, SETMEM returns the current size of the far
heap.
 
If SETMEM cannot change the far heap by the requested number of bytes,
it reallocates as many bytes as possible.
 
SETMEM can be used in mixed-language programming to decrease the far
heap space so procedures in other languages can dynamically allocate
far memory.
 
  Note: A first call to SETMEM trying to increase the far heap has no
        effect because BASIC allocates as much memory as possible to
        the far heap when a program starts.