No "Blank Lines Not Allowed" if SUB Moved to New Module in QBX (78891)



The information in this article applies to:

  • Microsoft Basic Professional Development System for MS-DOS 7.1
  • Microsoft Basic Professional Development System for MS-DOS 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.

MORE INFORMATION

Steps to Reproduce Problem

  1. Start QBX.EXE.
  2. Create a subprogram as follows:
         SUB SUB1
           PRINT "In sub1"
         END SUB
    						
  3. Try to insert lines before the SUB SUB1 statement. The message "Blank lines not allowed before SUB/FUNCTION line. Is remark OK?" will be displayed. Choose Cancel.
  4. From the File menu, choose Create File (ALT, F, C).
  5. Enter FILE2.BAS (or any other valid file name) as the name of the file.
  6. Press the F2 button to display SUBs.
  7. Highlight the subprogram name SUB1.
  8. From the SUBs dialog box, choose the Move option located in the bottom center of the window.
  9. From the file list box, highlight FILE2.BAS and choose OK.
  10. From the file list box, choose Cancel.
  11. From the SUBs dialog box, choose Cancel.
  12. Press the F2 button to display SUBs
  13. From the SUBs dialog box, highlight Sub1 (under FILE2.BAS) and choose Edit in Active.
  14. 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.
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.

Modification Type:MinorLast Reviewed:8/16/2005
Keywords:KB78891