Microsoft KB Archive/78891

= No &quot;Blank Lines Not Allowed&quot; if SUB Moved to New Module in QBX =

Article ID: 78891

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 Q78891



SUMMARY
In the QBX.EXE environment, adding lines above a SUB or FUNCTION statement normally gives you the following message:

Blank lines not allowed before SUB/FUNCTION line. Is remark OK?

This message will not occur when you attempt to add blank lines above a SUB or FUNCTION that has been moved via the View SUBs menu option.



Steps to Reproduce Problem
 Start QBX.EXE.  Create a subprogram as follows: SUB SUB1 PRINT &quot;In sub1&quot; END SUB  Try to insert lines before the SUB SUB1 statement. The message &quot;Blank lines not allowed before SUB/FUNCTION line. Is remark OK?&quot; will be displayed. Choose Cancel. From the File menu, choose Create File (ALT, F, C). Enter FILE2.BAS (or any other valid file name) as the name of the file. Press the F2 button to display SUBs. Highlight the subprogram name SUB1.</li> From the SUBs dialog box, choose the Move option located in the bottom center of the window.</li> From the file list box, highlight FILE2.BAS and choose OK.</li> From the file list box, choose Cancel.</li> From the SUBs dialog box, choose Cancel.</li> Press the F2 button to display SUBs</li> From the SUBs dialog box, highlight Sub1 (under FILE2.BAS) and choose Edit in Active.</li> Press ENTER to add blank lines before SUB Sub1 and enter some code above the SUB statement. QBX will allow you to add code without displaying an error message.</li></ol>

If you try to insert code above a SUB or FUNCTION that was not moved from the View Subs screen, the error will occur and a remark will be added to the beginning of the line if you choose OK.

Additional query words: BasicCom 7.00 7.10

Keywords: KB78891

-

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

© Microsoft Corporation. All rights reserved.