BUG: Macintosh QuickBasic Listing Window Corrupted During Edit (65936)






This article was previously published under Q65936

SYMPTOMS

Modifying the sample code below can corrupt the code displayed in the Listing window. This problem occurs after you first run the program and then try to make changes. This problem occurs only in this specific program; thus, it is very rare.

If the Listing window becomes corrupted, exit QuickBasic without saving and then re-enter QuickBasic. You can now safely reload the program. The program will be safe on disk as long as you don't Save after the Listing window becomes corrupted.

Microsoft has confirmed this problem in Microsoft QuickBasic versions 1.00 and 1.00a for the Macintosh . We are currently researching this problem and will post new information here as it becomes available.

MORE INFORMATION

To demonstrate this problem, do the following:

  1. Run the program.
  2. Press ENTER and the program will dimension the array.
  3. Stop the program by pressing COMMAND+PERIOD (or select Stop from the File menu).
  4. Modify the following line:

    m=17543:n=2

  5. This line will now become garbage.
You can also attempt to modify other parts of the code and the same type of problem will occur.

The exact line spacing shown below is significant in this problem. Changing the line spacing or modifying the code in other ways may cause the problem to go away. For example, adding REM to the blank lines and then following the steps described above will not demonstrate the problem.

Note: The first three lines at the top of the program must all be blank and subsequent blank lines, such as the seven blank lines in the middle, must be entered as shown in order to duplicate the problem.

Sample Code

DEFDBL a-z

GOSUB menusub
WHILE INKEY$="":WEND
PRINT "dimming"
m=17543:m=2
DIM a(m)
PRINT "hi"
GOSUB menusub
WHILE -1:WEND





menusub:
a$=a$+"4.1"
MENU 1,0,1,"menu1"
MENU 1,1,1,"1.1"
MENU 1,2,1,"1.2"
MENU 2,0,1,"menu2"
MENU 2,1,1,"2.1"
MENU 2,2,1,"2.2"
MENU 3,0,1,"menu3"
MENU 3,1,1,"3.1"
MENU 3,2,1,"3.2"
MENU 4,0,1,"menu4"
MENU 4,1,1,"4.1"
MENU 4,2,1,"4.2"
MENU 5,0,1,"menu5"
MENU 5,1,1,"5.1"
MENU 5,2,1,"5.2"
RETURN
				

Modification Type: Minor Last Reviewed: 1/9/2003
Keywords: kbbug KB65936