Microsoft KB Archive/71902

= NOT EOF(1) Means &quot;COM1: &quot; Characters Are Waiting; TERMINAL.BAS =

Article ID: 71902

Article Last Modified on 11/21/2006



This article was previously published under Q71902



SUMMARY
The following incorrect comment regarding the EOF function is found in the TERMINAL.BAS program released with QuickBasic versions 4.00, 4.00b, and 4.50; with Microsoft Basic Compiler versions 6.00 and 6.00b; and with Microsoft Basic Professional Development System (PDS) versions 7.00 and 7.10 for MS-DOS. The incorrect comment is also printed on page 132 of the &quot;Microsoft Basic 7.0: Programmer's Guide&quot; (for versions 7.00 and 7.10): ' Check the modem. If characters are waiting (EOF(1) is  ' true), get them and print them to the screen: This should be changed to read as follows: ' Check the modem. If characters are waiting (EOF(1) is  ' not true), get them and print them to the screen:



MORE INFORMATION
TERMINAL.BAS is a &quot;dumb&quot; terminal program that sends typed characters to the modem, and prints characters returned by the modem onto the screen.

The following correct documentation is taken from QBX.EXE's Help Details for the EOF function:

When you use EOF with a communications device, the definition of the end-of-file condition depends on the mode (ASCII or binary) in which you opened the device. In ASCII mode, EOF is false until you receive CTRL+Z, after which it remains true until you close the device. In binary mode, EOF is true when the input queue is empty (LOC(n)=0). It becomes false when the input queue is not empty.

Additional query words: QuickBas BasicCom

Keywords: KB71902

-

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

© Microsoft Corporation. All rights reserved.