Do Not Mix Arrayname AS Type and % Type Suffix in DIM/COMMON (35969)
The information in this article applies to:
- Microsoft QuickBASIC 1.0a
- 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 Q35969 SYMPTOMS
Do not mix the use of "AS Type" declaration syntax with explicit type
declaration suffixes (%, &, !, #, and $) with a given array name that
occurs in both DIM and COMMON statements. Programs should be run in
the QuickBasic QB.EXE editor to catch such a mismatch error.
If you compile Example Program 1 (below) with the BC /D (debug)
option, then the .EXE file will produce an error at run time. If you
do not compile with BC /D (debug) option, then the mismatched
DIM/COMMON declaration will not be detected, and the resulting .EXE
file will hang the machine, requiring a cold boot.
This article applies to Microsoft QuickBasic 4.00, 4.00b, and 4.50 and
to Microsoft Basic Compiler Versions 6.00 and 6.00b (buglist6.00,
buglist6.00b) for MS-DOS and MS OS/2. This problem was corrected in
Microsoft Basic PDS Version 7.00 (fixlist7.00) for MS-DOS and MS OS/2.
Modification Type: | Minor | Last Reviewed: | 1/8/2003 |
---|
Keywords: | KB35969 |
---|
|