Microsoft KB Archive/59764

= BUG: WIDTH Not Reset in Mac QuickBasic Interpreter; Use 255 =

Article ID: 59764

Article Last Modified on 11/21/2006



This article was previously published under Q59764



SYMPTOMS
The WIDTH for the output window in the interpreter in QuickBasic Version 1.00 for the Macintosh is not reset at the end of program execution. This can cause problems with subsequent program executions. For example, with a subsequent program that LOCATEs to a specific column and PRINTs a string, the string is placed on the next line if it exceeds the WIDTH set in the previous program. This problem does not occur in compiled applications.

To work around the problem, place a WIDTH 255 statement at the beginning of the program (or execute WIDTH 255 in the Command window). This resets the WIDTH to the default and has the effect of an &quot;infinite&quot; width.

Microsoft has confirmed this to be a bug in Microsoft QuickBasic Version 1.00 for the Macintosh. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.



MORE INFORMATION
This problem affects the sample program on Pages 408 and 409 of the &quot;Microsoft QuickBasic for Macintosh : Language Reference&quot; manual. On the first run of this program, everything displays correctly, but on the second execution, the first PRINT statement is written at the beginning of the next line.

Code Example
The following code example demonstrates the problem when run multiple times: LOCATE 1, 30 PRINT &quot;Hello&quot; WIDTH 30 END On the first run of the above program, it displays &quot;Hello&quot; beginning at the 30th column of the 1st line of the output window. The second and ensuing runs of the program display &quot;Hello&quot; on the beginning of the 2nd line.

Additional query words: MQuickB

Keywords: kbbug KB59764

-

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

© Microsoft Corporation. All rights reserved.