Microsoft KB Archive/49889

= PUTing a CONST to RANDOM/BINARY File Hangs QB.EXE 4.5 Editor =

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 &quot;Binding...&quot; 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 &quot;Variable required,&quot; 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 &quot;Variable required&quot; is flagged and the offending constant is highlighted.



Code Example
The QuickBasic editor hangs, displaying the message &quot;Binding...&quot; 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 &quot;test.dat&quot; FOR RANDOM AS #1   'Problem also occurs FOR BINARY PUT #1, 1, a

Additional query words: QuickBas BasicCom buglist4.50 B_BasicCom

Keywords: KB49889

-

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

© Microsoft Corporation. All rights reserved.