Disappearing SUB Statement When Editing in QB.EXE/QBX.EXE (65549)



The information in this article applies to:

  • Microsoft QuickBASIC 4.5
  • Microsoft Basic Professional Development System for MS-DOS 7.0
  • Microsoft Basic Professional Development System for MS-DOS 7.1

This article was previously published under Q65549

SYMPTOMS

While programming inside the QB.EXE or QBX.EXE environment, a SUB statement may temporarily disappear when specific steps are performed. These steps involve a combination of deleting the comment line above a SUB...END SUB, moving the cursor with the DOWN ARROW key, and using the TAB key. The steps below demonstrate the problem.

STATUS

Microsoft has confirmed this to be a bug in the QB.EXE environment of Microsoft QuickBasic version 4.50 (buglist4.50) for MS-DOS and in the QBX.EXE environment of Microsoft Basic Professional Development System (PDS) versions 7.00 and 7.10 for MS-DOS. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

This particular problem (using the exact steps below) does not occur in earlier versions.

MORE INFORMATION

To reproduce this problem, create a SUB containing the following code:
   '
   SUB DeleteMe
       PRINT "dummy line"
   END SUB
				
Do the following on the code above:

  1. Move the cursor to the first line and delete the comment.
  2. Press the DOWN ARROW key to attempt to move the cursor to the next line.
  3. The following error message box will pop up:
    Blank lines not allowed before SUB/FUNCTION line. Is remark OK?
    Press the ENTER key, which will accept the message and delete the blank line.
  4. Press the DOWN ARROW key again to move the cursor to the next line. If you are using the QB.EXE program that comes with Microsoft QuickBasic version 4.50, the line that says "SUB DeleteMe" will be deleted. If you are using the QBX.EXE program that comes with Basic PDS version 7.00 or 7.10, continue to Step 5 to reproduce the problem.
  5. After using the DOWN ARROW key to move the cursor to any line of code in the SUB, press the TAB key and that line will be replaced with the line "SUB DeleteMe".
  6. If you press the DOWN ARROW key again, the original line will reappear.
NOTE: If the text is not returned, you may be able to recover the text in Basic PDS versions 7.00 and 7.10 by choosing the Undo command from the Edit menu to reverse the previous edit. The Undo command reverses up to 20 previous edits.

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