qb45advr.hlp (
Topic list)
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.