Microsoft KB Archive/31787

= IF THEN NEXT / THEN WEND Not Supported =

Article ID: 31787

Article Last Modified on 11/21/2006



This article was previously published under Q31787



SUMMARY
You cannot conditionally execute NEXT and WEND statements using the single-line IF...THEN...ELSE statement.

The following two syntax examples, which are supported by GW-Basic and QuickBasic Version 2.01 and previous versions, are not supported by QuickBasic Versions 3.00 and later: IF THEN NEXT

IF THEN WEND Using this illegal syntax will give the following error message at compile time:

&quot;NEXT without FOR&quot; or &quot;WEND without WHILE&quot;



MORE INFORMATION
This situation is documented in the following manuals:


 * 1) Page 272 of the &quot;Microsoft QuickBasic 4.00: Learning and Using&quot; manual.
 * 2) Page 272 of the &quot;Microsoft Basic Compiler Version 6.00 for MS-DOS and OS/2: Learning and Using QuickBasic&quot;
 * 3) Gray Page Update-57 of the &quot;Microsoft QuickBasic Version 3.00 Update&quot; manual.

Additional query words: QuickBas BasicCom

Keywords: KB31787

-

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

© Microsoft Corporation. All rights reserved.