"Subscript out of Range" Long-Integer Array in IF/THEN in 4.50 (57926)
This article was previously published under Q57926
SYMPTOMS
The QuickBasic Version 4.50 program shown below produces a "Subscript
out of range" error if compiled with the BC /D (debug) switch. This
appears to be caused by a compiler optimization problem for the
particular combination of using a long-integer variable to subscript a
long-integer array in an IF ... THEN statement.
If the program is run from the QB.EXE environment or is not compiled
with the BC /D switch, the error does not occur.
STATUS
Microsoft has confirmed this to be a bug in Microsoft QuickBasic Version
4.50. We are researching this problem and will post new information here in
the Microsoft Knowledge Base as it becomes available.
This problem does not occur in versions of QuickBasic prior to
Version 4.50, in Microsoft Basic Compiler Versions 6.00 and 6.00b for
MS-DOS and MS OS/2, or in Microsoft Basic Professional Development
System (PDS) Version 7.00 for MS-DOS and MS OS/2.
Modification Type: |
Minor |
Last Reviewed: |
1/9/2003 |
Keywords: |
KB57926 |
|