Q26710: BC.EXE "Internal Error" Long-Integer Arrays; OK /D or QB.EXE
Article: Q26710
Product(s): See article
Version(s): 4.00 4.00b
Operating System(s): MS-DOS
Keyword(s): ENDUSER | B_BasicCom buglist4.00 buglist4.00b fixlist6.00b fixlist4.50 | mspl13_basic
Last Modified: 21-DEC-1988
The following program, which uses long-integer arrays, gives an
"Internal Error" when compiled with BC.EXE.
Microsoft has confirmed this to be a problem in QuickBASIC Versions
4.00 and 4.00b, and in the Microsoft BASIC Compiler Versions 6.00 for
MS-DOS and MS OS/2. This problem was corrected in QuickBASIC Version
4.50 and Basic Compiler Version 6.00b.
No error message is generated when this program is run within the
QB.EXE editor/interpreter.
The workarounds are as follows:
1. Use the debug option (BC /d) when compiling.
2. Convert all long-integer arrays to any other numeric type.
Note: Long integers are not supported in previous versions of
QuickBASIC.
The following code demonstrates the problem:
DECLARE SUB connect (TransMap%())
'THIS FILE RETURNS AN <INTERNAL ERROR NEAR 5F15> WHEN
'COMPILED WITH BC.EXE without the /d (debug) option.
CONST MaxBlob% = 60
DIM SHARED BlobPrX&(MaxBlob%)
DIM SHARED BlobUp%(MaxBlob%), BlobDn%(MaxBlob%)
CALL connect(BlobUp%())
SUB connect (TransMap%()) STATIC
linewidth& = TransMap%(PrNo% + 1)
BlobPrX&(BBno%) = BlobPrX&(BBno%) + ABS(TransMap%(PrNo%) -
BlobUp%(BBno%)) + ABS(TransMap%(PrNo% + 1) - BlobDn%(BBno%))
END SUB
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
Copyright Microsoft Corporation 1986-2002.