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.
Variable Storage and Memory Use
◄Variables► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
Variable Storage and Memory Use
Type of BASIC data Compiler options Memory location
──────────────────────────────────────────────────────────────────────────────
Simple numeric(1) variables All DGROUP
Variable-length string All DGROUP
descriptors
Variable-length string data Far Strings (/Fs) Far Heap
Near strings Default DGROUP
All numeric(1) array All DGROUP
descriptors
Static numeric(1) array data All DGROUP
Dynamic numeric(1) array data All Far Heap
Huge dynamic numeric(1) array Huge Arrays (/Ah) Far Heap
data
──────────────────────────────────────────────────────────────────────────────
(1) Denotes INTEGER, LONG, SINGLE, DOUBLE, CURRENCY, and user-defined data
types and fixed-length strings.
──────────────────────────────────────────────────────────────────────────────
When you compile from within QBX, the default compile option is far string
(/Fs) if a Quick library is loaded, and near string otherwise. When you
compile from the command line, near string storage is the default, as it
was in all previous versions of BASIC. To use far string storage instead,
add the /Fs option to the BASIC Compiler (BC) command line.
Because the QBX environment treats all strings as far strings, a program
that uses near pointers to string data cannot be run or debugged in the
QBX environment. However, the program may still work when compiled using
the near string compiler option, and can be debugged with CodeView. On
the other hand, far pointers will always work in QBX and in a program
compiled with far strings.
See Also ◄Variable Storage and Memory Use - Description►
◄Variable-Length String Storage►
◄String Array Storage►
◄Numeric Array Storage►
◄Static and Dynamic Arrays►
◄Huge Dynamic Array Storage►