Different Ways Arrays Can Be Stored in Basic (58926)
The information in this article applies to:
- Microsoft Visual Basic for MS-DOS
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
This article was previously published under Q58926 SUMMARY
Arrays can be stored in different places depending on array type and
on whether the program is run from an .EXE file, or the VBDOS.EXE
(included with Microsoft Visual Basic for MS-DOS) or QB.EXE
(included with Microsoft QuickBasic for MS-DOS and Microsoft Basic
Compiler for MS-DOS) environments. All nonarray (scalar) variables
are always stored in the DGROUP segment.
In the VBDOS.EXE and QB.EXE environments, a static array of numeric type
or fixed-length-string type must be in a COMMON or COMMON SHARED
statement to be allocated in the DGROUP memory area; otherwise it will
be stored in the far heap.
In an executable file (.EXE), all types of static arrays are always
stored in the DGROUP area (which can be referenced with a near
address).
Dynamic or static arrays of variable-length strings are always stored
in DGROUP in VBDOS.EXE, QB.EXE and .EXE programs.
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB58926 |
---|
|