Bad EXE Result, Expression Indexing Dynamic Long Integer Array (59428)
This article was previously published under Q59428
SYMPTOMS
Subscripting $DYNAMIC long-integer arrays with expressions can give
incorrect results in a compiled .EXE program, as shown in the code
example further below. (The example below works correctly when run in
the QB.EXE editor.)
To work around this problem, do not use an expression in the
subscript. Instead, store the result of the expression in a temporary
variable and use that variable to subscript the array.
STATUS
Microsoft has confirmed this to be a bug in Microsoft QuickBasic
versions 4.00, 4.00b, and 4.50, and in Microsoft Basic Compiler
versions 6.00 and 6.00b for MS-DOS and MS OS/2 (buglist6.00,
buglist6.00b). This problem was corrected in Microsoft Basic
Professional Development System (PDS) version 7.00 (fixlist7.00).
Modification Type: |
Minor |
Last Reviewed: |
1/9/2003 |
Keywords: |
KB59428 |
|