NOT EOF(1) Means "COM1: " Characters Are Waiting; TERMINAL.BAS (71902)






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 "Microsoft Basic 7.0: Programmer's Guide" (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 "dumb" 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.


Modification Type: Minor Last Reviewed: 1/8/2003
Keywords: KB71902