"Invalid Character" in Compiler on DIM for Dynamic Array (32417)
This article was previously published under Q32417
SUMMARY
The compiler in QuickBASIC for Macintosh gives an "Invalid character"
message for a DIM statement at compile time if an array is dimensioned
using a variable or function in the subscript, and the "Make All
Arrays Static" compiler option is selected (or DIM STATIC is used).
This error occurs because a static array must be dimensioned with a
constant or simple constant expression in the array subscript in the
DIM statement.
To allow a variable or function in the array subscript in the DIM
statement, you must make the array dynamic (by turning off the "Make
All Arrays Static" option and by using DIM instead of DIM STATIC).
If some arrays need to remain dynamic while others are static, use the
DIM STATIC statement to dimension static arrays and DIM to dimension
dynamic arrays, and do not select "Make All Arrays STATIC" (in the
"Options..." item of the Run menu).
Modification Type: |
Minor |
Last Reviewed: |
1/8/2003 |
Keywords: |
KB32417 |
|