Microsoft KB Archive/34981

= &quot;Expected End of Statement,&quot; Line Label with Leading Numeric =

Article ID: 34981

Article Last Modified on 11/21/2006



This article was previously published under Q34981



SUMMARY
QuickBasic Versions 4.00, 4.00b and 4.50 do not allow a leading numeric character in a line label. QuickBasic assumes that any line label starting with a number to be a line number followed by an executable statement. If such a line label is entered within the QuickBasic Version 4.00 or 4.00b editing environment, an &quot;Expected End of Statement&quot; error message is displayed. For a detailed explanation, refer to Page 9 of the &quot;Microsoft QuickBasic Compiler 4.0: Basic Language Reference&quot; manual.

This information applies to Microsoft QuickBasic Versions 4.00, 4.00b, and 4.50 for MS-DOS, to Microsoft Basic Compiler Versions 6.00 and 6.00b for MS-DOS and MS OS/2, and to Microsoft Basic PDS Version 7.00 for MS-DOS and MS OS/2.



MORE INFORMATION
QuickBasic Version 3.00 does allow leading numbers in a line label. To convert a QuickBasic Version 3.00 program to QuickBasic Version 4.00, 4.00b or 4.50, select the Change option in the Search menu to replace all occurrences of the improper label with a valid line label or line number.

The following program generates an &quot;Expected End of Statement&quot; error: PRINT &quot;hello&quot; GOTO 2line 2line: PRINT &quot;goodbye&quot;

Additional query words: QuickBas BasicCom

Keywords: KB34981

-

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

© Microsoft Corporation. All rights reserved.