Microsoft KB Archive/85287

= BC.EXE Gives Element Not Defined Error w/ REM $INCLUDE in TYPE =

Article ID: 85287

Article Last Modified on 8/16/2005

-

APPLIES TO


 * Microsoft BASIC Professional Development System 7.1
 * Microsoft BASIC Professional Development System 7.0

-



This article was previously published under Q85287



SYMPTOMS
The BC.EXE compiler incorrectly reports the error &quot;Element not defined&quot; if you use a REM $INCLUDE statement within the TYPE/END TYPE statement block. The problem does not occur in QBX.EXE.



STATUS
Microsoft has confirmed this to be a bug in the BC.EXE compiler of Microsoft Basic Professional Development System (PDS) for MS-DOS, versions 7.0 and 7.1. This problem was corrected in Microsoft Visual Basic version 1.0 for MS-DOS.



MORE INFORMATION
If the TYPE/END TYPE statement block only contains a REM $INCLUDE statement, the error occurs on the END TYPE statement. If the TYPE/END TYPE statement block contains a REM $INCLUDE statement in addition to normal element declarations, the error occurs where you refer to the members declared in the include file.

The problem does not occur in Microsoft QuickBasic for MS-DOS, version 4.5.

Steps to Reproduce Problem
  Enter the following statements into a module named T.BAS: TYPE t         s AS STRING * 10 REM $INCLUDE: 'T.BI' END TYPE DIM v AS t     v.s = &quot;hello&quot; v.i = 123     ' BC.EXE reports &quot;Element not defined&quot;.   Enter the following element declaration into an include file named T.BI: i AS INTEGER   Compile the the following program: BC T.BAS; BC.EXE reports &quot;Element not defined.&quot; 

Additional query words: VBmsdos BasicCom 7.00 7.10 1.00 user defined b_vbmsdos buglist7.00 buglist7.10 fixlist1.00

Keywords: KB85287

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.