Microsoft KB Archive/49889

From BetaArchive Wiki
Knowledge Base


Article ID: 49889

Article Last Modified on 8/16/2005



APPLIES TO

  • Microsoft QuickBasic 4.5 for MS-DOS



This article was previously published under Q49889

SYMPTOMS

Using a CONST type of constant as the third argument of a PUT statement when writing to a RANDOM or BINARY file hangs QB.EXE at run time and during the Make EXE File command, leaving the word "Binding..." in the lower-left corner of the screen. This problem occurs only within the QuickBasic version 4.5 editor.

STATUS

Microsoft has confirmed this to be a bug in QB.EXE in QuickBasic version 4.5 for MS-DOS.

When compiled outside the environment, BC.EXE correctly flags the error with the message "Variable required," displaying the PUT statement with a caret pointing to the offending CONSTant. The third argument of the PUT statement requires a variable, and CONSTants are not allowed.

This problem does not occur in the QBX.EXE environment of Microsoft Basic Professional Development System (PDS) version 7.0 for MS-DOS (fixlist7.00). Within QBX.EXE, the error "Variable required" is flagged and the offending constant is highlighted.

MORE INFORMATION

Code Example

The QuickBasic editor hangs, displaying the message "Binding..." in the lower-left corner of the screen, when you run (by pressing SHIFT+F5) or compile (by using the Make EXE File command from the Run menu) the following program:

CONST a = 1
OPEN "test.dat" FOR RANDOM AS #1    'Problem also occurs FOR BINARY
PUT #1, 1, a
                


Additional query words: QuickBas BasicCom buglist4.50 B_BasicCom

Keywords: KB49889