Microsoft KB Archive/36023

= &quot;Statement Illegal in TYPE block&quot; Due to Line Identifier =

Article ID: 36023

Article Last Modified on 11/21/2006



This article was previously published under Q36023



SUMMARY
Line labels and line numbers are not permitted within TYPE ... END TYPE statement blocks. A &quot;Statement illegal in TYPE block&quot; error message appears if this is attempted.

Under the TYPE ... END TYPE statement (listed alphabetically) in the &quot;Microsoft QuickBasic 4.0: Basic Language Reference&quot; manual for QuickBasic Versions 4.00 and 4.00b, in the &quot;Microsoft QuickBasic 4.5: Basic Language Reference&quot; manual for QuickBasic Version 4.50, and in the &quot;Microsoft Basic Compiler 6.0: Basic Language Reference&quot; manual for Microsoft Basic Compiler Versions 6.00 and 6.00b, it needs to mention that line identifiers are forbidden in TYPE ... END TYPE statements.

This documentation omission has been corrected in the &quot;Microsoft Basic 7.0: Language Reference&quot; for Microsoft Basic Professional Development System (PDS) Version 7.00 for MS-DOS and MS OS/2.



MORE INFORMATION
The BC.EXE compiler correctly gives the following error message in all of the above products when you compile the code example farther below: 10       partnumber AS STRING * 6 ^ Identifier expected ^ Skipping forward to END TYPE statement DIM stockrecord AS stockitem ^ TYPE not defined

Code Example
'This gives &quot;Statement illegal in TYPE block message, 'due to the presence of line identifiers. TYPE stockitem 10       partnumber AS STRING * 6 description AS STRING * 20 unitprice AS SINGLE abcd:    quantity   AS INTEGER END TYPE DIM stockrecord AS stockitem

Additional query words: QuickBas BasicCom

Keywords: KB36023

-

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

© Microsoft Corporation. All rights reserved.