SUMMARY
Microsoft recommends compiling with the debug option (BC /D) whenever
arrays are being used. If a math problem involving arrays is corrected
by compiling with the debug (/D) option, that program must be compiled
with the debug option.
When using dynamic long-integer arrays in some math calculations in
the EXE program, the results may not be correct unless you compile
with the BC.EXE debug option (BC /D). The example below demonstrates
this behavior.
Inside the QB.EXE environment, the debug option always is on (and
cannot be disabled); this means the math problem does not occur when
programs are run in QB.EXE.
The sample program below demonstrates the importance of the debug (BC
/D) option, which does the following:
- Generates debugging code for run-time error checking
- Enables the CTRL+BREAK command to break a program
- Executes array-boundary checking
Compiling with the debug option in the sample program below is
essential to making the program work correctly.
This information applies to Microsoft QuickBasic Versions 4.00, 4.00b,
and 4.50, and Microsoft Basic Compiler Versions 6.00 and 6.00b for
MS-DOS and OS/2.